.github/workflows/dockerimages.yml #24
This file contains hidden or 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
| env: | |
| DOCKER_BUILDKIT: "1" | |
| COMPOSE_DOCKER_CLI_BUILD: "1" | |
| BUILDKIT_PROGRESS: "plain" | |
| NO_SQUASH: "" | |
| RELEASABLE_REPOS: "^kiorky/" | |
| RELEASABLE_BRANCHES: "^(refs/heads/)?(master|main|32b)$" | |
| jobs: | |
| build-32bits: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| max-parallel: 5 | |
| fail-fast: false | |
| matrix: | |
| FLAVOR: [32bits, latest] | |
| steps: | |
| - name: Set vars | |
| run: |- | |
| if ( echo "$GITHUB_REF" | egrep -q "${RELEASABLE_BRANCHES}" ) \ | |
| && ( echo "$GITHUB_REPOSITORY" | egrep -q "${RELEASABLE_REPOS}" ) | |
| then releasable=true;else releasable=false;fi | |
| echo "releasable=$releasable" >> $GITHUB_OUTPUT | |
| id: v | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
| - uses: actions/checkout@v3 | |
| - name: Build & test | |
| run: | | |
| set -ex | |
| export COMPOSE_FILE="docker-compose.yml:docker-compose-build.yml" | |
| if ( "${{matrix.FLAVOR}}" | grep -q 32 );then | |
| export COMPOSE_FILE="${COMPOSE_FILE}:docker-compose-32bits.yml:docker-compose-build-32bits.yml" | |
| fi | |
| docker compose build | |
| docker compose run --rm --entrypoint tox app --direct -e py312-std | |
| - name: Release | |
| run: | | |
| if [ "x${{steps.v.outputs.releasable}}" = "xtrue" ];then | |
| set -ex && docker push kiorky/croniter:${{matrix.FLAVOR}} | |
| fi | |
| on: | |
| workflow_dispatch: | |
| schedule: [{cron: '1 0 1,3,5,15,17,19 * *'}] |