Merge branch 'main' into feature/dev-2818-use-pid1-for-launching-sipi… #1029
Workflow file for this run
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: ci | |
on: | |
schedule: | |
# run every midnight (on main) | |
- cron: '0 0 * * *' | |
push: | |
jobs: | |
# Run tests and publish amd64 | |
build_amd64: | |
name: Run tests and publish amd64 | |
runs-on: actuated | |
concurrency: | |
group: ${{ github.ref }}-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@v2 | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: make docker-test-build-amd64 | |
- run: make test-integration-ci | |
- name: Push image to Docker hub only on main or tag (release) but not on schedule | |
if: (github.ref_name == 'main' || startsWith(github.ref, 'refs/tags')) && github.event_name != 'schedule' | |
run: make docker-push-amd64 | |
# Run tests and publish aarch64 | |
build_aarch64: | |
name: Run tests and publish aarch64 | |
runs-on: actuated-aarch64 | |
concurrency: | |
group: ${{ github.ref }}-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@v2 | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: make docker-test-build-aarch64 | |
- run: make test-integration-ci | |
- name: Push image to Docker hub only on main or tag (release) but not on schedule | |
if: (github.ref_name == 'main' || startsWith(github.ref, 'refs/tags')) && github.event_name != 'schedule' | |
run: make docker-push-aarch64 | |
# publish manifest combining aarch64 and amd64 images | |
publish_manifest: | |
name: Build and Publish Manifest to Dockerhub | |
runs-on: ubuntu-latest | |
needs: [build_amd64, build_aarch64] | |
if: (github.ref_name == 'main' || startsWith(github.ref, 'refs/tags')) && github.event_name != 'schedule' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: make docker-publish-manifest | |
# build documentation | |
build_docs: | |
name: Build docs testrun | |
runs-on: ubuntu-latest | |
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 docs-install-requirements | |
- run: make docs-build | |
# publish documentation on release | |
publish-docs: | |
name: Build and publish docs on tag | |
needs: [build_docs] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags') && github.event_name != 'schedule' | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 |