PagerMaid-Pyro/.gitea/workflows/docker_dev.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.3 KiB
YAML
Raw Normal View History

name: "Docker Dev Build"
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
workflow_dispatch: ~
push:
branches: [ development ]
jobs:
build:
runs-on: ubuntu-latest
name: docker build and publish
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
run: |
PGM_VERSION=$(python .github/get_version.py)
docker buildx build \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--output "type=image,push=true" \
--platform "linux/amd64,linux/arm64/v8" \
--build-arg "S6_ARCH=amd64" \
--tag "${{ secrets.DOCKER_REPO }}:dev" \
--tag "${{ secrets.DOCKER_REPO }}:${PGM_VERSION}-dev" \
-f Dockerfile.alpine \
.