Skip to content

Commit cc99d34

Browse files
committed
ci(misc/wireworld): 添加 LEVEL-0 工作流文件
1 parent 0b11d5b commit cc99d34

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Challenge Wireworld[Level0]
2+
3+
on:
4+
push:
5+
branches: ["main", "misc/wireworld"]
6+
paths:
7+
- "!**/README.md"
8+
- "challenges/misc/wireworld_level0/build/**"
9+
workflow_dispatch:
10+
11+
env:
12+
TYPE: misc
13+
NAME: wireworld_level0
14+
REGISTRY: ghcr.io
15+
16+
jobs:
17+
challenge-build:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Log in to the Container registry
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ${{ env.REGISTRY }}
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Extract metadata (tags, labels) for Docker
37+
id: meta
38+
uses: docker/metadata-action@v5
39+
with:
40+
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.NAME }}
41+
tags: |
42+
latest
43+
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v6
46+
with:
47+
context: challenges/${{ env.TYPE }}/${{ env.NAME }}/build
48+
tags: ${{ steps.meta.outputs.tags }}
49+
labels: ${{ steps.meta.outputs.labels }}
50+
push: true

0 commit comments

Comments
 (0)