|
3 | 3 | push: |
4 | 4 | tags: |
5 | 5 | - '*' |
| 6 | + workflow_run: |
| 7 | + workflows: ["Test Pull Requests"] |
| 8 | + types: |
| 9 | + - completed |
| 10 | + |
6 | 11 | jobs: |
7 | 12 | build: |
8 | 13 | runs-on: ubuntu-latest |
| 14 | + if: > |
| 15 | + github.event.workflow_run.conclusion == 'success' || |
| 16 | + github.event_name == 'push' |
9 | 17 | steps: |
10 | | - - |
11 | | - name: Set up Docker Buildx |
12 | | - uses: docker/setup-buildx-action@v2 |
13 | | - - |
14 | | - name: Set up Docker Metadata |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v4 |
| 20 | + - name: Set up Docker Buildx |
| 21 | + uses: docker/setup-buildx-action@v3 |
| 22 | + - name: Set up Docker Metadata |
15 | 23 | id: meta |
16 | | - uses: docker/metadata-action@v4 |
| 24 | + uses: docker/metadata-action@v5 |
17 | 25 | with: |
18 | 26 | images: | |
19 | 27 | cr.brightbox.com/${{ vars.CR_ACCOUNT }}/${{ vars.CR_REPO }}/brightbox-cloud-controller-manager |
20 | 28 | tags: | |
21 | 29 | type=semver,pattern={{version}} |
22 | | - - |
23 | | - name: Login to Brightbox Container Registry |
24 | | - uses: docker/login-action@v2 |
| 30 | + type=ref,event=pr |
| 31 | + - name: Login to Brightbox Container Registry |
| 32 | + uses: docker/login-action@v3 |
25 | 33 | with: |
26 | 34 | registry: cr.brightbox.com |
27 | 35 | username: ${{ vars.CR_USERNAME }} |
28 | 36 | password: ${{ secrets.CR_SECRET }} |
29 | | - - |
30 | | - name: Docker build and push |
31 | | - uses: docker/build-push-action@v4 |
| 37 | + - name: Docker build and push |
| 38 | + uses: docker/build-push-action@v6 |
32 | 39 | with: |
33 | 40 | tags: ${{ steps.meta.outputs.tags }} |
34 | 41 | labels: ${{ steps.meta.outputs.labels }} |
|
0 commit comments