@@ -3,7 +3,7 @@ name: Continuous Integration
33on :
44 push :
55 branches :
6- - test-ci
6+ - main
77 paths-ignore :
88 - ' docs/**'
99 - ' examples/**'
4646 run : |
4747 echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)"
4848 echo "::set-output name=repo::$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2)"
49- echo "::set-output name=version::${GITHUB_REF/refs\/tags\//} "
49+ echo "::set-output name=version::$(echo $ {GITHUB_REF} | cut -d '/' -f 2) "
5050
5151 build :
5252 name : Build Image
@@ -60,16 +60,16 @@ jobs:
6060 - name : DockerHub Login
6161 uses : docker/login-action@v1
6262 with :
63- username : ${{ secrets.TEST_DOCKER_USERNAME }}
64- password : ${{ secrets.TEST_DOCKER_PASSWORD }}
63+ username : ${{ secrets.DOCKER_USERNAME }}
64+ password : ${{ secrets.DOCKER_PASSWORD }}
65+ if : github.event_name != 'pull_request'
66+ - name : Login to GitHub Container Registry
67+ uses : docker/login-action@v1
68+ with :
69+ registry : ghcr.io
70+ username : ${{ github.repository_owner }}
71+ password : ${{ secrets.GITHUB_TOKEN }}
6572 if : github.event_name != 'pull_request'
66- # - name: Login to GitHub Container Registry
67- # uses: docker/login-action@v1
68- # with:
69- # registry: ghcr.io
70- # username: ${{ github.repository_owner }}
71- # password: ${{ secrets.GITHUB_TOKEN }}
72- # if: github.event_name != 'pull_request'
7373 - name : Setup QEMU
7474 uses : docker/setup-qemu-action@v1
7575 with :
8282 uses : docker/metadata-action@v3
8383 with :
8484 images : |
85- ciarasf5/nginx-ingress-operator
85+ nginx/nginx-ingress-operator
86+ ghcr.io/nginxinc/nginx-ingress-operator
8687 tags : |
8788 type=edge
8889 type=ref,event=pr
@@ -115,15 +116,15 @@ jobs:
115116 build-args : |
116117 VERSION=${{ steps.var.outputs.version }}
117118 - name : Run Trivy vulnerability scanner
118- uses :
aquasecurity/[email protected] .3 119+ uses :
aquasecurity/[email protected] .5 119120 continue-on-error : true
120121 with :
121122 image-ref : nginx/nginx-ingress-operator:${{ steps.meta.outputs.version }}
122123 format : ' sarif'
123124 output : ' trivy-results.sarif'
124125 ignore-unfixed : ' true'
125126 - name : Upload Trivy scan results to GitHub Security tab
126- uses : github/codeql-action/upload-sarif@v1
127+ uses : github/codeql-action/upload-sarif@v2
127128 continue-on-error : true
128129 with :
129130 sarif_file : ' trivy-results.sarif'
@@ -144,7 +145,7 @@ jobs:
144145 steps :
145146 - name : Workflow Status
146147 id : check
147- uses : martialonline/workflow-status@v2
148+ uses : martialonline/workflow-status@v3
148149 - name : Send Notification
149150 uses : 8398a7/action-slack@v3
150151 if : steps.check.outputs.status == 'failure'
0 commit comments