chore(main): release 3.12.2 (#438) #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
branches: | |
- main | |
create: | |
# This triggers for any tag or branch creation. We'll filter for tags in the job. | |
jobs: | |
# Build for release and publish amd64 | |
amd64: | |
if: github.ref == 'refs/heads/main' || (github.event_name == 'create' && startsWith(github.ref, 'refs/tags/')) | |
runs-on: buildjet-4vcpu-ubuntu-2204 | |
concurrency: | |
group: ${{ github.ref }}-publish-amd64 | |
cancel-in-progress: true | |
steps: | |
- uses: dasch-swiss/sipi/.github/actions/checkout@main | |
with: | |
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }} | |
- uses: dasch-swiss/sipi/.github/actions/setup-python@main | |
- run: make install-requirements | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: make docker-test-build-amd64 # two stage build, where test is run in the first stage | |
- run: make test-smoke-ci | |
- name: Push image to Docker hub | |
run: make docker-push-amd64 | |
# Build for release and publish aarch64 | |
aarch64: | |
if: github.ref == 'refs/heads/main' || (github.event_name == 'create' && startsWith(github.ref, 'refs/tags/')) | |
runs-on: buildjet-4vcpu-ubuntu-2204-arm | |
concurrency: | |
group: ${{ github.ref }}-publish-aarch64 | |
cancel-in-progress: true | |
steps: | |
- uses: dasch-swiss/sipi/.github/actions/checkout@main | |
with: | |
DASCHBOT_PAT: ${{ secrets.DASCHBOT_PAT }} | |
- uses: dasch-swiss/sipi/.github/actions/setup-python@main | |
- run: make install-requirements | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: make docker-test-build-aarch64 # two stage build, where test is run in the first stage | |
- run: make test-smoke-ci | |
- name: Push image to Docker hub | |
run: make docker-push-aarch64 | |
# Publish manifest combining aarch64 and amd64 images | |
manifest: | |
runs-on: ubuntu-latest | |
needs: [ amd64, aarch64 ] | |
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')) | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: make docker-publish-manifest | |
# Publish release to Sentry allowing us to track more | |
sentry: | |
runs-on: ubuntu-latest | |
needs: [ manifest ] | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
version: ${{ github.ref_name }} | |
# Publish documentation | |
docs: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mhausenblas/mkdocs-deploy-gh-pages@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
CUSTOM_DOMAIN: sipi.io | |
CONFIG_FILE: docs/mkdocs.yml | |
REQUIREMENTS: docs/requirements.txt |