|
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 | buildDockerImage: |
10 | | - if: github.repository == 'nerdswords/yet-another-cloudwatch-exporter' |
11 | | - name: Build docker image |
| 10 | + name: Publish release artefacts |
12 | 11 | runs-on: ubuntu-latest |
| 12 | + needs: [test_ui, test_go, test_go_more, test_go_oldest, test_windows, golangci, codeql, build_all] |
| 13 | + if: | |
| 14 | + (*github.repository == 'prometheus-community/yet-another-cloudwatch-exporter') |
| 15 | + && |
| 16 | + (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v.')) |
13 | 17 | steps: |
14 | | - - uses: actions/checkout@v4 |
15 | | - |
16 | | - - uses: actions/setup-go@v5 |
17 | | - with: |
18 | | - go-version: ^1.23 |
19 | | - |
20 | | - - name: Set up QEMU |
21 | | - uses: docker/setup-qemu-action@v3 |
22 | | - |
23 | | - - name: Set up Docker Buildx |
24 | | - uses: docker/setup-buildx-action@v3 |
25 | | - |
26 | | - - name: Log into docker |
27 | | - env: |
28 | | - DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
29 | | - DOCKER_REGISTRY_URL: ghcr.io |
30 | | - DOCKER_USERNAME: ${{ github.actor }} |
31 | | - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL |
32 | | - |
33 | | - - name: Build and Publish docker image |
34 | | - run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/nerdswords/yet-another-cloudwatch-exporter:${{github.ref_name}} --build-arg VERSION=${{github.ref_name}} --push . |
35 | | - |
36 | | - - name: Build && release binaries |
37 | | - uses: goreleaser/goreleaser-action@v6 |
38 | | - env: |
39 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
40 | | - with: |
41 | | - args: release --clean |
| 18 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 19 | + - uses: prometheus/promci@52c7012f5f0070d7281b8db4a119e21341d43c91 # v0.4.5 |
| 20 | + - uses: ./.github/promci/actions/publish_release |
| 21 | + with: |
| 22 | + docker_hub_login: ${{ secrets.docker_hub_login }} |
| 23 | + docker_hub_password: ${{ secrets.docker_hub_password }} |
| 24 | + quay_io_login: ${{ secrets.quay_io_login }} |
| 25 | + quay_io_password: ${{ secrets.quay_io_password }} |
| 26 | + github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }} |
0 commit comments