Nightly cron publish #209
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 cron publish | |
env: | |
TARGET_PLATFORMS: "linux/amd64,linux/arm64" | |
OS_FLAVOUR: "alpine" | |
on: | |
schedule: | |
- cron: "2 0 * * *" | |
workflow_dispatch: | |
inputs: | |
os_flavour: | |
description: "OS flavour" | |
required: false | |
default: "alpine" | |
type: choice | |
options: | |
- alpine | |
- debian | |
target_platforms: | |
description: "Target platforms to build this image for" | |
required: false | |
default: "linux/amd64,linux/arm64" | |
type: string | |
jobs: | |
build_and_publish: | |
name: Build and publish docker | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
buildkitd-config: .github/buildkitd.toml | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push the nightly | |
run: ./build.sh | |
env: | |
TARGET_PLATFORM: ${{ inputs.target_platforms || env.TARGET_PLATFORMS }} | |
OS_FLAVOUR: ${{ inputs.os_flavour || env.OS_FLAVOUR }} | |
PS_VERSION: "nightly" | |
PUSH: "true" |