-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (37 loc) · 1012 Bytes
/
docker.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
37
38
39
40
41
42
name: deploy
on:
push:
branches:
- master
- dev
tags:
- '*.*.*'
jobs:
docker:
runs-on: ubuntu-24.04
name: Build and deploy docker image
steps:
- name: Get release tag
id: tag
run: |
case ${{ github.ref_name }} in
master)
echo name=latest >> $GITHUB_OUTPUT ;;
*.*.*)
echo name=release-${{ github.ref_name }} >> $GITHUB_OUTPUT ;;
*)
echo name=${{ github.ref_name }} >> $GITHUB_OUTPUT ;;
esac
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
file: docker/Dockerfile
tags: galantelab/sider:${{ steps.tag.outputs.name }}