actions: cross build in ci and fix publish (#3533)

* actions: cross build in ci and fix publish

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* actions: build before release publishing

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

---------

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
This commit is contained in:
Jan Fajerski 2023-10-12 11:43:30 +02:00 committed by GitHub
parent e92d29d861
commit d7b865d6cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 7 deletions

View File

@ -16,6 +16,21 @@ jobs:
- run: make apiv2 - run: make apiv2
- run: git diff --exit-code - run: git diff --exit-code
build:
name: Build Alertmanager for common architectures
runs-on: ubuntu-latest
strategy:
matrix:
thread: [ 0, 1, 2 ]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
- uses: ./.github/promci/actions/build
with:
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386"
parallelism: 3
thread: ${{ matrix.thread }}
test: test:
name: Test name: Test
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -9,13 +9,27 @@ jobs:
name: Run ci name: Run ci
uses: ./.github/workflows/ci.yml uses: ./.github/workflows/ci.yml
publish_main: build:
name: Publish main branch artefacts name: Build Alertmanager for all architectures
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
needs: ci needs: ci
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: prometheus/promci@v0.0.2 - uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
- uses: ./.github/promci/actions/build
with:
parallelism: 12
thread: ${{ matrix.thread }}
publish_main:
name: Publish main branch artefacts
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
- uses: ./.github/promci/actions/publish_main - uses: ./.github/promci/actions/publish_main
with: with:
docker_hub_login: ${{ secrets.docker_hub_login }} docker_hub_login: ${{ secrets.docker_hub_login }}

View File

@ -9,17 +9,30 @@ jobs:
name: Run ci name: Run ci
uses: ./.github/workflows/ci.yml uses: ./.github/workflows/ci.yml
publish_release: build:
name: Publish release arfefacts name: Build Alertmanager for all architectures
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
needs: ci needs: ci
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: prometheus/promci@v0.0.2 - uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
- uses: ./.github/promci/actions/build
with:
parallelism: 12
thread: ${{ matrix.thread }}
publish_release:
name: Publish release artefacts
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
- uses: ./.github/promci/actions/publish_release - uses: ./.github/promci/actions/publish_release
with: with:
docker_hub_login: ${{ secrets.docker_hub_login }} docker_hub_login: ${{ secrets.docker_hub_login }}
docker_hub_password: ${{ secrets.docker_hub_password }} docker_hub_password: ${{ secrets.docker_hub_password }}
quay_io_login: ${{ secrets.quay_io_login }} quay_io_login: ${{ secrets.quay_io_login }}
quay_io_password: ${{ secrets.quay_io_password }} quay_io_password: ${{ secrets.quay_io_password }}
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }}