-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from Azure/fix/ci-permission-failure
Added permission write to Build_Push_Image job.
- Loading branch information
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
|
||
jobs: | ||
code_quality_checks: | ||
|
@@ -17,27 +15,29 @@ jobs: | |
name: Linting | ||
if: "true" | ||
with: | ||
path: ./src | ||
path: ./src | ||
- uses: hadolint/[email protected] | ||
name: Docker Linting | ||
with: | ||
dockerfile: ./src/Dockerfile | ||
- name: MD Linting | ||
uses: actionshub/markdownlint@main | ||
uses: actionshub/markdownlint@main | ||
- name: Stay woke | ||
uses: get-woke/woke-action@v0 | ||
with: | ||
# Cause the check to fail on any broke rules | ||
fail-on-error: true | ||
fail-on-error: true | ||
|
||
Build_Push_Image: | ||
runs-on: ubuntu-latest | ||
needs: code_quality_checks | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
|
@@ -53,7 +53,7 @@ jobs: | |
with: | ||
push: true | ||
context: ./src | ||
tags: ghcr.io/azure/gitops-connector:${{ env.IMAGE_TAG }}, ghcr.io/azure/gitops-connector:latest | ||
tags: ghcr.io/azure/gitops-connector:${{ env.IMAGE_TAG }}, ghcr.io/azure/gitops-connector:latest | ||
- name: Upload Image Tags | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -64,4 +64,3 @@ jobs: | |
with: | ||
name: manifests | ||
path: ${{ github.workspace }}/manifests | ||
|