Skip to content

Detect tags and build Docker images #589

Detect tags and build Docker images

Detect tags and build Docker images #589

Workflow file for this run

name: Detect tags and build Docker images
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
schedule:
# The official docs: "The schedule event can be delayed during periods of high loads of
# GitHub Actions workflow runs. High load times include the start of every hour. To decrease
# the chance of delay, schedule your workflow to run at a different time of the hour."
# 42 is for https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy
# 9 is just a magic number
- cron: '42 9 * * *'
concurrency:
group: ${{ github.repository }}/${{ github.workflow }}/${{ github.event_name }}
cancel-in-progress: true
jobs:
build-images:
strategy:
fail-fast: false
matrix:
include:
- github-repository: giscus/giscus
platforms: linux/amd64,linux/arm64
dockerhub-repository: wooseopkim/giscus
first-ref: e2368de91c3382ee256a4632628de00dd05a0e94
ref-type: head
dockerfile: docker/Dockerfile
pre-build-script: |
mkdir -p "$CHECKOUT_PATH"/docker
cp ./giscus/* "$CHECKOUT_PATH"/docker
uses: ./.github/workflows/build-image.yml
with:
github-repository: ${{ matrix.github-repository }}
dockerhub-repository: ${{ matrix.dockerhub-repository }}
dockerfile: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }}
first-ref: ${{ matrix.first-ref }}
ref-type: ${{ matrix.ref-type }}
push-image: ${{ github.event_name == 'schedule' }}
pre-build-script: ${{ matrix.pre-build-script }}
post-build-script: ${{ matrix.post-build-script }}
secrets:
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}