gcr.io_mirror/.github/workflows/gcr.io_mirror.yml

39 lines
1.4 KiB
YAML

name: gcr.io_mirror
on:
issues:
types: [opened, edited]
label:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, 'porter')
steps:
- name: 检出代码
uses: actions/checkout@v3
- name: 设置 golang 环境
uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
cache: true
- name: 运行 go 代码
run: go run main.go --github.token=${{ secrets.GITHUB_TOKEN }} --github.user=${{ github.repository_owner }} --github.repo=${{ github.event.repository.name }} --docker.registry=${{ secrets.DOCKER_REGISTRY }} --docker.namespace=${{ secrets.DOCKER_NAMESPACE }} --docker.user=${{ secrets.DOCKER_USER }} --docker.secret=${{ secrets.DOCKER_PASSWORD }} --github.run_id=${{ github.run_id }}
auto_close_issues:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v3
- name: 自动关闭不通过issues模板创建的issues
uses: lucasbento/auto-close-issues@v1.0.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-close-message: "@${issue.user.login}: 不是说了别瞎搞嘛! :wave: 对于不按照 issues 模板来的一律自动关闭issues."
closed-issues-label: "不按照模板提的Issues" # optional property