Build and publish to DockerHub #160
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
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 1 * * SAT' | |
name: Build and publish to DockerHub | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | |
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | |
jobs: | |
update: | |
name: update | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@main | |
- | |
name: Update Dockerfiles | |
run: | | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git config user.name "github-actions[bot]" | |
./scripts/update.sh | |
git push | |
# stable: | |
# needs: update | |
# name: stable | |
# runs-on: ubuntu-latest | |
# steps: | |
# - | |
# name: Checkout | |
# uses: actions/checkout@main | |
# - | |
# name: Set up QEMU | |
# uses: docker/setup-qemu-action@v1 | |
# - | |
# name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v1 | |
# - | |
# name: Build and Publish stable docker images | |
# run: | | |
# export DOCKER_BUILD_CONTEXT="stable" | |
# export DOCKER_IMAGE_VERSION=`sed -ne "s/^ARG VERSION=['\"]\([^'\"]*\)['\"]/\1/p" stable/Dockerfile` | |
# export DOCKER_TAGS="stable,latest,${DOCKER_IMAGE_VERSION}" | |
# ./scripts/publish.sh | |
edge: | |
needs: update | |
name: edge | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- | |
name: Checkout | |
uses: actions/checkout@main | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Build and Publish edge docker images | |
run: | | |
export DOCKER_BUILD_CONTEXT="edge" | |
export DOCKER_IMAGE_VERSION="master" | |
export DOCKER_TAGS="edge" | |
./scripts/publish.sh | |