2020-12-29 05:01:58 -05:00
|
|
|
name: Docker publish to docker.io
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- .github/workflows/docker-publish.yml
|
|
|
|
- 'src/**'
|
|
|
|
- 'conf/**'
|
2020-12-29 05:03:50 -05:00
|
|
|
- 'types/**'
|
2020-12-29 05:01:58 -05:00
|
|
|
- 'docker-bin/**'
|
|
|
|
- 'bin/**'
|
|
|
|
- 'package.json'
|
|
|
|
- 'yarn.lock'
|
2021-05-14 01:04:19 -05:00
|
|
|
- '.yarn/**'
|
|
|
|
- '.yarnrc.yaml'
|
|
|
|
- '.pnp.js'
|
2020-12-29 05:01:58 -05:00
|
|
|
branches:
|
|
|
|
- '**'
|
2021-04-09 03:00:47 -05:00
|
|
|
tags:
|
|
|
|
- 'v*'
|
2020-12-29 05:01:58 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: docker/setup-qemu-action@v1
|
|
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
with:
|
|
|
|
driver-opts: network=host
|
|
|
|
- uses: docker/login-action@v1
|
2020-12-29 05:39:21 -05:00
|
|
|
name: Login Docker Hub
|
2020-12-29 05:01:58 -05:00
|
|
|
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-03-28 11:47:55 -05:00
|
|
|
tag-custom: 5.x-next
|
2021-04-09 11:38:26 -05:00
|
|
|
tag-custom-only: ${{ github.ref == 'refs/heads/5.x' }}
|
2021-04-09 02:16:06 -05:00
|
|
|
tag-semver: |
|
|
|
|
{{version}}
|
|
|
|
{{major}}
|
|
|
|
{{major}}.{{minor}}
|
2020-12-29 05:01:58 -05:00
|
|
|
- name: Build & Push
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.docker_meta.outputs.labels }}
|