CI #1218
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: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
schedule: | |
- cron: "0 7 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f | |
- name: setup qemu for multi-arch build | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: amd64,arm64 | |
- name: setup buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: create version string | |
id: version | |
run: | | |
if [ "${GITHUB_REF##*/}" == "master" ]; then | |
echo "VERSION=3.3.0-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV | |
else | |
BRANCH_TO_DOCKER=$(echo ${GITHUB_REF##*/} | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9._-]//g') | |
echo "VERSION=${BRANCH_TO_DOCKER}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV | |
fi | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
#registry: registry.hub.docker.com | |
username: wurstbrot | |
password: ${{ secrets.HUB_TOKEN }} | |
- name: create and push yaml image | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
file: Dockerfile-yaml | |
platforms: linux/amd64,linux/arm64 | |
tags: wurstbrot/dsomm-yaml-generation:${{ env.VERSION }},wurstbrot/dsomm-yaml-generation:latest | |
- name: create and push dsomm image | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: wurstbrot/dsomm:${{ env.VERSION }},wurstbrot/dsomm:latest | |