-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (37 loc) · 1.16 KB
/
release.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
name: release
on:
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
steps:
- uses: actions/checkout@v4
- name: Expose git context
id: git
run: |
echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "ref=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.git.outputs.sha }}
${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.git.outputs.ref }}
${{ env.REGISTRY }}/${{ github.repository }}:latest
build-args: |
GITHUB_SHA=${{steps.git.outputs.sha}}
GITHUB_REF=${{steps.git.outputs.ref}}
push: true