Skip to content

Commit

Permalink
ci(web/unserialize): 添加工作流文件
Browse files Browse the repository at this point in the history
  • Loading branch information
13m0n4de committed Oct 25, 2024
1 parent 98fb769 commit 9e9e90a
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/web.unserialize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Challenge Unserialize

on:
push:
branches: ["main", "web/unserialize"]
paths:
- "!**/README.md"
- "challenges/web/unserialize/build/**"
workflow_dispatch:

env:
TYPE: web
NAME: unserialize
REGISTRY: ghcr.io

jobs:
challenge-build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.NAME }}
tags: |
latest
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: challenges/${{ env.TYPE }}/${{ env.NAME }}/build
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true

0 comments on commit 9e9e90a

Please sign in to comment.