|
33 | 33 | security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
34 | 34 | packages: write # for docker/build-push-action to push to GHCR
|
35 | 35 | id-token: write # for docker/login to login to NGINX registry
|
36 |
| - runs-on: ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') && 'kic-plus' || 'ubuntu-22.04' }} |
| 36 | + runs-on: ubuntu-22.04 |
37 | 37 | services:
|
38 | 38 | registry:
|
39 | 39 | image: registry:2
|
@@ -65,30 +65,28 @@ jobs:
|
65 | 65 | with:
|
66 | 66 | platforms: arm64
|
67 | 67 |
|
68 |
| - - name: Login to GitHub Container Registry |
69 |
| - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 |
70 |
| - if: ${{ github.event_name != 'pull_request' && ! contains(inputs.image, 'plus') }} |
71 |
| - with: |
72 |
| - registry: ghcr.io |
73 |
| - username: ${{ github.repository_owner }} |
74 |
| - password: ${{ secrets.GITHUB_TOKEN }} |
| 68 | + - name: Output Variables |
| 69 | + id: vars |
| 70 | + run: echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT |
75 | 71 |
|
76 |
| - - name: Get Id Token |
77 |
| - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
78 |
| - id: idtoken |
| 72 | + - name: Build binary |
| 73 | + uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 |
79 | 74 | with:
|
80 |
| - script: | |
81 |
| - let id_token = await core.getIDToken() |
82 |
| - core.setOutput('id_token', id_token) |
83 |
| - if: ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus')}} |
84 |
| - |
85 |
| - - name: Login to NGINX Registry |
86 |
| - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 |
| 75 | + version: latest |
| 76 | + args: ${{ github.ref_type == 'tag' && 'release' || 'build --snapshot' }} --clean |
| 77 | + env: |
| 78 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 79 | + GOPATH: ${{ steps.vars.outputs.go_path }} |
| 80 | + AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }} |
| 81 | + AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} |
| 82 | + AZURE_BUCKET_NAME: ${{ secrets.AZURE_BUCKET_NAME }} |
| 83 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }} |
| 84 | + |
| 85 | + - name: Fetch Cached Artifacts |
| 86 | + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 |
87 | 87 | with:
|
88 |
| - registry: docker-mgmt.nginx.com |
89 |
| - username: ${{ steps.idtoken.outputs.id_token }} |
90 |
| - password: ${{ github.actor }} |
91 |
| - if: ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') }} |
| 88 | + path: ${{ github.workspace }}/dist |
| 89 | + key: nginx-gateway-fabric-${{ github.run_id }}-${{ github.run_number }} |
92 | 90 |
|
93 | 91 | - name: NGF Docker meta
|
94 | 92 | id: ngf-meta
|
|
0 commit comments