Skip to content

Commit bba2454

Browse files
committed
add latest image
Signed-off-by: Chen Kai <[email protected]>
1 parent e0e8259 commit bba2454

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/image.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: latest image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: write
17+
18+
env:
19+
REGISTRY: ghcr.io
20+
IMAGE_NAME: ${{ github.repository }}
21+
22+
jobs:
23+
push_image_to_github:
24+
name: Push Docker image to Github
25+
runs-on: ubuntu-latest
26+
permissions: write-all
27+
steps:
28+
- name: Check out the repo
29+
uses: actions/checkout@v4
30+
- name: Log in to Docker Hub
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Build and push api Docker image
38+
uses: docker/build-push-action@v6
39+
with:
40+
context: .
41+
file: ./api.Dockerfile
42+
push: true
43+
tags: ${{ env.REGISTRY }}/${{ github.repository }}-api:latest
44+
45+
- name: Build and push archiver Docker image
46+
uses: docker/build-push-action@v6
47+
with:
48+
context: .
49+
file: ./archiver.Dockerfile
50+
push: true
51+
tags: ${{ env.REGISTRY }}/${{ github.repository }}-archiver:latest

0 commit comments

Comments
 (0)