-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (27 loc) · 982 Bytes
/
csyncd-image.yml
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: csyncd-image
on:
push:
tags:
- '*'
jobs:
build-csyncd-image:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | sed -e "s/^v//")
- name: Build the image
run: docker build -f csyncd/Dockerfile -t fioncat/csyncd:${{ steps.get_version.outputs.VERSION }} .
- name: Push the image
run: docker push fioncat/csyncd:${{ steps.get_version.outputs.VERSION }}
- name: Tag latest image
run: docker tag fioncat/csyncd:${{ steps.get_version.outputs.VERSION }} fioncat/csyncd:latest
- name: Push latest image
run: docker push fioncat/csyncd:latest