Skip to content

Commit fcf9253

Browse files
committed
chore: add docker canary publish action
1 parent 61184d1 commit fcf9253

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Reference: https://github.com/docker/build-push-action/blob/master/docs/advanced/tags-labels.md
2+
3+
name: "Docker Publish Canary"
4+
5+
on:
6+
workflow_dispatch:
7+
8+
jobs:
9+
dockerize:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Docker meta
15+
id: meta
16+
uses: docker/metadata-action@v5
17+
with:
18+
images: moonrailgun/tailchat
19+
# generate Docker tags based on the following events/attributes
20+
tags: |
21+
type=sha
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v1
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v1
26+
- name: Login to DockerHub
27+
if: github.event_name != 'pull_request'
28+
uses: docker/login-action@v1
29+
with:
30+
username: ${{ secrets.DOCKERHUB_USERNAME }}
31+
password: ${{ secrets.DOCKERHUB_TOKEN }}
32+
- name: Build and push
33+
uses: docker/build-push-action@v2
34+
with:
35+
context: .
36+
platforms: linux/amd64,linux/arm64
37+
push: ${{ github.event_name != 'pull_request' }}
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}
40+
build-args: VERSION=canary-${{ steps.meta.outputs.tags }}

0 commit comments

Comments
 (0)