2020-12-29 16:30:47 -05:00
|
|
|
name: Docker publish to docker.io
|
2020-12-29 05:01:58 -05:00
|
|
|
|
2020-06-24 05:28:00 -05:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
2020-12-29 16:30:47 -05:00
|
|
|
- .github/workflows/docker-publish.yml
|
2020-06-24 05:28:00 -05:00
|
|
|
- .github/workflows/docker-publish.yml
|
|
|
|
- 'packages/**'
|
|
|
|
- 'docker-bin/**'
|
|
|
|
- 'package.json'
|
2020-08-22 15:25:08 -05:00
|
|
|
- 'pnpm-*.yaml'
|
2020-12-30 16:31:13 -05:00
|
|
|
- 'Dockerfile'
|
|
|
|
- '.dockerignore'
|
2020-12-29 16:30:47 -05:00
|
|
|
branches:
|
2021-04-10 04:55:38 -05:00
|
|
|
- 'master'
|
2020-12-29 16:30:47 -05:00
|
|
|
tags:
|
|
|
|
- 'v*'
|
2022-11-12 01:42:01 -05:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
2020-12-29 05:01:58 -05:00
|
|
|
jobs:
|
2020-12-29 16:30:47 -05:00
|
|
|
docker:
|
2020-09-01 14:22:36 -05:00
|
|
|
runs-on: ubuntu-latest
|
2020-12-29 05:01:58 -05:00
|
|
|
steps:
|
2024-04-25 03:16:50 -05:00
|
|
|
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v3
|
2023-09-25 14:25:51 -05:00
|
|
|
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # tag=v1
|
2020-12-29 16:30:47 -05: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 04:55:38 -05:00
|
|
|
tag-custom: nightly-master
|
|
|
|
tag-custom-only: ${{ github.ref == 'refs/heads/master' }}
|
2020-12-29 16:30:47 -05:00
|
|
|
tag-semver: |
|
|
|
|
{{version}}
|
|
|
|
{{major}}
|
|
|
|
{{major}}.{{minor}}
|
|
|
|
- name: Build & Push
|
2023-02-06 15:57:38 -05:00
|
|
|
uses: docker/build-push-action@v4
|
2020-09-01 14:22:36 -05:00
|
|
|
with:
|
2020-12-29 16:30:47 -05:00
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
2023-02-19 17:22:37 -05:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2020-12-29 16:30:47 -05:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.docker_meta.outputs.labels }}
|