Skip to content

Commit 3f37002

Browse files
committed
ci: add GitHub action to build Docker image
1 parent 2fb79c1 commit 3f37002

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and Push Docker Image
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch: {}
7+
jobs:
8+
build-and-push:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Login to GitHub Container Registry
12+
uses: docker/login-action@v3
13+
with:
14+
registry: ghcr.io
15+
username: ${{ github.actor }}
16+
password: ${{ secrets.GITHUB_TOKEN }}
17+
- name: Login to DockerHub
18+
uses: docker/login-action@v3
19+
with:
20+
username: ${{ secrets.DOCKERHUB_USERNAME }}
21+
password: ${{ secrets.DOCKERHUB_TOKEN }}
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v3
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
- name: Build and push
27+
uses: docker/build-push-action@v6
28+
with:
29+
push: true
30+
tags: ghcr.io/enxg/skyticket:latest
31+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)