Skip to content

Commit 87d1ace

Browse files
committed
set up docker image release process
1 parent d44a5d3 commit 87d1ace

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
permissions:
8+
contents: read
9+
packages: write
10+
11+
jobs:
12+
docker:
13+
name: Build and Push Docker Image
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
18+
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
24+
25+
- name: Login to GitHub Container Registry
26+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Build and push
33+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
34+
with:
35+
context: .
36+
push: true
37+
platforms: linux/amd64,linux/arm64
38+
tags: |
39+
ghcr.io/${{ github.repository }}:latest
40+
ghcr.io/${{ github.repository }}:${{ github.ref_name }}

0 commit comments

Comments
 (0)