Skip to content

Commit

Permalink
Merge pull request #69 from Azure/fix/ci-permission-failure
Browse files Browse the repository at this point in the history
Added permission write to Build_Push_Image job.
  • Loading branch information
pareion authored Jun 15, 2024
2 parents d36e3ae + 16eaa9f commit 45a3ec2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

name: CI

on:
push:
branches:
- main


jobs:
code_quality_checks:
Expand All @@ -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 }}
Expand All @@ -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:
Expand All @@ -64,4 +64,3 @@ jobs:
with:
name: manifests
path: ${{ github.workspace }}/manifests

0 comments on commit 45a3ec2

Please sign in to comment.