-
Notifications
You must be signed in to change notification settings - Fork 24
43 lines (40 loc) · 1.24 KB
/
Copy pathrestore-release.yml
File metadata and controls
43 lines (40 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Restore Release
on:
workflow_dispatch:
inputs:
release_tag:
description: "The release tag that should be restored in the container registry"
required: true
arguments:
description: "Arguments to the restore release command"
required: false
permissions:
contents: read
packages: write
jobs:
release:
environment: production
if: github.repository == 'bufbuild/plugins'
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v7
- name: Login to GitHub Container Registry
if: github.repository == 'bufbuild/plugins'
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Install Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
check-latest: true
- name: Restore Release
env:
GITHUB_TOKEN: ${{ github.token }}
ARGUMENTS: ${{ inputs.arguments }}
RELEASE_TAG: ${{ inputs.release_tag }}
run: |
go run ./internal/cmd/restore-release ${ARGUMENTS} "${RELEASE_TAG}"