2020-12-29 22:30:47 +01:00
|
|
|
name: Docker publish to docker.io
|
2020-12-29 11:01:58 +01:00
|
|
|
|
2020-06-24 12:28:00 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
2020-12-29 22:30:47 +01:00
|
|
|
- .github/workflows/docker-publish.yml
|
2020-06-24 12:28:00 +02:00
|
|
|
- .github/workflows/docker-publish.yml
|
|
|
|
- 'packages/**'
|
|
|
|
- 'docker-bin/**'
|
|
|
|
- 'package.json'
|
2020-08-22 22:25:08 +02:00
|
|
|
- 'pnpm-*.yaml'
|
2020-12-30 22:31:13 +01:00
|
|
|
- 'Dockerfile'
|
|
|
|
- '.dockerignore'
|
2020-12-29 22:30:47 +01:00
|
|
|
branches:
|
2021-04-10 11:55:38 +02:00
|
|
|
- 'master'
|
2020-12-29 22:30:47 +01:00
|
|
|
tags:
|
|
|
|
- 'v*'
|
2022-11-12 07:42:01 +01:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
2020-12-29 11:01:58 +01:00
|
|
|
jobs:
|
2020-12-29 22:30:47 +01:00
|
|
|
docker:
|
2020-09-01 21:22:36 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-12-29 11:01:58 +01:00
|
|
|
steps:
|
2023-01-18 20:06:56 +01:00
|
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag=v3
|
2022-10-18 21:35:12 +02:00
|
|
|
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # tag=v1
|
2020-12-29 22:30:47 +01:00
|
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
with:
|
|
|
|
driver-opts: network=host
|
|
|
|
- uses: docker/login-action@v1
|
|
|
|
name: Login Docker Hub
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Prepare docker image tags
|
|
|
|
id: docker_meta
|
|
|
|
uses: crazy-max/ghaction-docker-meta@v1
|
|
|
|
with:
|
|
|
|
images: ${{ github.repository }}
|
2021-04-10 11:55:38 +02:00
|
|
|
tag-custom: nightly-master
|
|
|
|
tag-custom-only: ${{ github.ref == 'refs/heads/master' }}
|
2020-12-29 22:30:47 +01:00
|
|
|
tag-semver: |
|
|
|
|
{{version}}
|
|
|
|
{{major}}
|
|
|
|
{{major}}.{{minor}}
|
|
|
|
- name: Build & Push
|
|
|
|
uses: docker/build-push-action@v2
|
2020-09-01 21:22:36 +02:00
|
|
|
with:
|
2020-12-29 22:30:47 +01:00
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
platforms: linux/amd64
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.docker_meta.outputs.labels }}
|