Skip to content
This repository was archived by the owner on Apr 27, 2024. It is now read-only.

Commit 0dc9559

Browse files
Build on tag creation
1 parent 729c543 commit 0dc9559

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build on creation of a new tag
2+
on:
3+
create:
4+
tags:
5+
- v*
6+
jobs:
7+
build-master:
8+
runs-on: ubuntu-latest
9+
steps:
10+
-
11+
name: Checkout
12+
uses: actions/checkout@v2
13+
-
14+
name: Set up QEMU
15+
uses: docker/setup-qemu-action@v1
16+
-
17+
name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v1
19+
-
20+
name: Login to GitHub Container Registry
21+
uses: docker/login-action@v1
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.repository_owner }}
25+
password: ${{ secrets.CR_PAT }}
26+
-
27+
name: Get the version
28+
id: get_version
29+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
30+
-
31+
name: Build and push
32+
id: docker_build
33+
uses: docker/build-push-action@v2
34+
with:
35+
push: true
36+
tags: ghcr.io/benjamin-maynard/kubernetes-cloud-mysql-backup:${{ steps.get_version.outputs.VERSION }}

0 commit comments

Comments
 (0)