From 16eaa9f5728eed8f708dc19519080a2fb54ac7b9 Mon Sep 17 00:00:00 2001 From: Anders Date: Sat, 15 Jun 2024 19:58:02 +0200 Subject: [PATCH] Added permission write to Build_Push_Image job. --- .github/workflows/ci.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ccdb6af..8c3e541 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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/hadolint-action@v1.5.0 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/upload-artifact@v2.2.2 with: @@ -64,4 +64,3 @@ jobs: with: name: manifests path: ${{ github.workspace }}/manifests - \ No newline at end of file