nightly and on.push docker builds #212
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: nightly and on.push docker builds | |
on: | |
# to trigger manually if we really need it | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- docker/** | |
- "!docker/README.md" | |
tags: | |
- "v*.*.*" | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# triggers every day at 00:00 UTC (midnight) | |
- cron: '0 0 * * *' | |
jobs: | |
build_and_publish_to_pypi: | |
environment: 'pypi' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
if: startsWith(github.ref, 'refs/tags/v') | |
- name: Build and publish to pypi | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: JRubics/[email protected] | |
with: | |
python_version: "3.11.2" | |
pypi_token: ${{ secrets.DEPLOY_FROM_GITHUB_TO_PYPI_ONBOARDME }} | |
docker-amd64: | |
environment: 'docker-amd64' | |
needs: build_and_publish_to_pypi | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build/push - prereqs only | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
# build from docker/ directory | |
context: docker | |
platforms: linux/amd64 | |
tags: | | |
jessebot/onboardme:debian12-prereqs | |
jessebot/onboardme:prereqs | |
- name: Build/push - run onboardme - default pkgs | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
# build from docker/ directory | |
context: docker | |
platforms: linux/amd64 | |
build-args: "DEFAULT=true" | |
tags: | | |
jessebot/onboardme:latest | |
jessebot/onboardme:debian12 | |
- name: Build/push - default + devops pkgs | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
# build from docker/ directory | |
context: docker | |
platforms: linux/amd64 | |
build-args: | | |
"DEFAULT=true" | |
"DEVOPS=true" | |
tags: | | |
jessebot/onboardme:devops | |
jessebot/onboardme:debian12-devops | |
- name: Build/push - full tui pkgs | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
# build from docker/ directory | |
context: docker | |
platforms: linux/amd64 | |
build-args: | | |
"DEFAULT=true" | |
"DEVOPS=true" | |
"MAIL=true" | |
"MUSIC=true" | |
tags: | | |
jessebot/onboardme:full-tui | |
jessebot/onboardme:debian12-full-tui | |
docker-arm64: | |
environment: 'docker-arm64' | |
runs-on: ubuntu-latest | |
needs: build_and_publish_to_pypi | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build/push - arm - prereqs only | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
# build from docker/ directory | |
context: docker | |
# use special Dockerfile for arm builds | |
file: docker/Dockerfile.arm | |
platforms: linux/arm64 | |
tags: | | |
jessebot/onboardme:debian12-arm-prereqs | |
jessebot/onboardme:arm-prereqs | |
- name: Build/push - arm - default pkgs | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
# build from docker/ directory | |
context: docker | |
# use special Dockerfile for arm builds | |
file: docker/Dockerfile.arm | |
platforms: linux/arm64 | |
build-args: "DEFAULT=true" | |
tags: | | |
jessebot/onboardme:latest-arm | |
jessebot/onboardme:debian12-arm | |
- name: Build/push arm - default + devops pkgs | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
# build from docker/ directory | |
context: docker | |
# use special Dockerfile for arm builds | |
file: docker/Dockerfile.arm | |
platforms: linux/arm64 | |
build-args: | | |
"DEFAULT=true" | |
"DEVOPS=true" | |
tags: | | |
jessebot/onboardme:arm-devops | |
jessebot/onboardme:debian12-arm-devops | |
- name: Build/push arm - full tui pkgs | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
# build from docker/ directory | |
context: docker | |
# use special Dockerfile for arm builds | |
file: docker/Dockerfile.arm | |
platforms: linux/arm64 | |
build-args: | | |
"DEFAULT=true" | |
"DEVOPS=true" | |
"MAIL=true" | |
"MUSIC=true" | |
tags: | | |
jessebot/onboardme:arm-full-tui | |
jessebot/onboardme:debian12-arm-full-tui |