Skip to content

update action config #2

update action config

update action config #2

Workflow file for this run

name: Build Hysteria2 Client
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# 允许手动触发工作流
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
- name: Extract Metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{github.repository}}
ghcr.io/${{github.repository}}
tags: |
type=ref,event=tag
type=edge,branch=main
- name: Build and Push Docker Images
id: build
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}