~linuxgoose/bocpress

ref: 25a3801b4d2932457cba8762da3febe8de42c5c9 bocpress/.github/workflows/image.yml -rw-r--r-- 1.1 KiB
25a3801bJordan Robinson update project files to release 1.3.7 8 days ago
                                                                                
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
44
45
46
47
48
49
name: Image

on:
  release:
    types: [ published ]
  workflow_dispatch:

# Set permissions to allow deployment to ghcr.io
permissions:
  packages: write
  contents: read

# Prevent concurrent builds
concurrency:
  group: image-${{ github.ref }}
  cancel-in-progress: false

jobs:
  push:
    runs-on: ubuntu-24.04

    steps:
      - uses: actions/checkout@v4

      - uses: docker/setup-buildx-action@v3

      - uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Extract metadata
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ghcr.io/${{ github.repository }}
          tags: |
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}

      - uses: docker/build-push-action@v5
        with:
          context: .
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          cache-from: type=gha
          cache-to: type=gha,mode=max