-
-
Notifications
You must be signed in to change notification settings - Fork 498
36 lines (30 loc) · 959 Bytes
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Publish
on:
create:
tags:
- v*
jobs:
publish:
name: "Publish to DockerHub"
runs-on: ubuntu-latest
steps:
- name: "Check out code"
uses: actions/checkout@v3
- name: "Set up QEMU"
uses: docker/[email protected]
- name: "Set up Docker Buildx"
uses: docker/[email protected]
- name: "Login to DockerHub"
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: "Build and push"
id: docker_build
uses: docker/[email protected]
with:
push: true
build-args: "VERSION=${{ github.ref_name }}"
tags: "${{ github.repository }}:latest,${{ github.repository }}:${{ github.ref_name }}"
- name: "Image digest"
run: echo ${{ steps.docker_build.outputs.digest }}