Skip to content

Bump axios and @julusian/jpeg-turbo #95

Bump axios and @julusian/jpeg-turbo

Bump axios and @julusian/jpeg-turbo #95

Workflow file for this run

name: Docker CI
on:
push:
branches: [ "master" ]
tags: [ "v*.*.*" ]
pull_request:
branches: [ "master" ]
release:
types: [published]
jobs:
configure-jobs:
name: Configure jobs
runs-on: ubuntu-latest
env:
docker-hub-image: ${{ vars.DOCKERHUB_USERNAME }}/homie-streamdeck
ghcr-image: ghcr.io/${{ github.repository_owner }}/homie-streamdeck
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set-configs
name: Enumerate all configured Dockerfiles
run: |
echo "configs=$(ls -l config/Dockerfile.* | grep '^-' | awk -F ' ' '{print $9}' | { while read x; do echo "${x##*.}"; done; } | jq -R -s -c 'split("\n") | map(select(length > 0))')" >> $GITHUB_OUTPUT
- id: choose-repo
name: Choose repository for Docker image
run: |
{
[ "${{ github.event_name == 'pull_request' }}" = "true" ] && echo "image=${{ env.ghcr-image }}" || echo "image=${{ env.docker-hub-image }}"
[ "${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}" = "true" ] && echo "is-push-to-master=true" || echo "is-push-to-master=false"
[ "${{ github.event_name == 'release' }}" = "true" ] && echo "is-release=true" || echo "is-release=false"
} >> $GITHUB_OUTPUT
outputs:
configs: ${{ steps.set-configs.outputs.configs }}
image: ${{ steps.choose-repo.outputs.image }}
is-push-to-master: ${{ steps.choose-repo.outputs.is-push-to-master }}
is-release: ${{ steps.choose-repo.outputs.is-release }}
build-base-image:
name: Build base image
needs: configure-jobs
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
platforms: ${{ vars.DOCKER_PLATFORMS }}
image: ${{ needs.configure-jobs.outputs.image }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
build-configured-images:
name: Build configured images
if: "github.event_name != 'pull_request'"
needs:
- configure-jobs
- build-base-image
strategy:
fail-fast: false
matrix:
config-name: ${{ fromJson(needs.configure-jobs.outputs.configs) }}
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
build-args: |
FROM_IMAGE=${{ needs.build-base-image.outputs.tag }}
image: ghcr.io/${{ github.repository_owner }}/homie-streamdeck-configured
flavor: |
latest=false
suffix=_${{ matrix.config-name }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
platforms: ${{ vars.DOCKER_PLATFORMS }}
path: config/
file: config/Dockerfile.${{ matrix.config-name }}