File: docker.yml

package info (click to toggle)
sideretro 1.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,636 kB
  • sloc: ansic: 15,270; perl: 46; python: 44; makefile: 3
file content (43 lines) | stat: -rw-r--r-- 1,012 bytes parent folder | download | duplicates (2)
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
43
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 }}