Debian Codegraph @

.github/workflows/docker_publish.yml

raw
1 name: Publish Docker package
2
3 on:
4 release:
5 types: [published]
6
7 env:
8 REGISTRY: ghcr.io
9 IMAGE_NAME: ${{ github.repository }}
10
11 jobs:
12 build:
13 runs-on: ubuntu-latest
14 permissions:
15 contents: read
16 packages: write
17
18 steps:
19 - name: Checkout repository
20 uses: actions/checkout@v5
21
22 - name: Log in to the Container registry
23 uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
24 with:
25 registry: ${{ env.REGISTRY }}
26 username: ${{ github.actor }}
27 password: ${{ secrets.GITHUB_TOKEN }}
28
29 - name: Extract metadata (tags, labels) for Docker
30 id: meta
31 uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f
32 with:
33 images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34
35 - name: Build and push Docker image
36 uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
37 with:
38 context: .
39 push: true
40 tags: ${{ steps.meta.outputs.tags }}
41 labels: ${{ steps.meta.outputs.labels }}