-
Notifications
You must be signed in to change notification settings - Fork 9
74 lines (64 loc) · 2.13 KB
/
push-tag.yml
File metadata and controls
74 lines (64 loc) · 2.13 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
# yamllint disable rule:line-length
name: Push tag to extension
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
repository:
required: true
type: string
version:
required: true
type: string
env_changes:
required: true
type: string
jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Echo inputs
run: |
echo "repository: ${{ inputs.repository }}"
echo "version: ${{ inputs.version }}"
echo "env_changes: ${{ inputs.env_changes }}"
- name: Generate a token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.RELEASER_APP_ID }}
private-key: ${{ secrets.RELEASER_APP_PRIVATE_KEY }}
repositories: ${{ inputs.repository }}
- name: Checkout
uses: actions/checkout@v4
with:
repository: codecov/${{ inputs.repository }}
token: ${{ steps.app-token.outputs.token }}
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.RELEASER_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
- name: Create release branch
run: git checkout -b release/wrapper/${{ inputs.version }}
- name: Pull latest wrapper
run: git submodule update --init --recursive --remote
- name: Make commit
run: |
git add src/scripts
git commit -S --message "chore(release): wrapper-${{ inputs.version }}"
git push origin release/wrapper/${{ inputs.version }} -f
- name: Install GitHub CLI
uses: dev-hanz-ops/install-gh-cli-action@v0.1.0
- name: Create pull request into main
run: |
gh pr create --title "chore(release): wrapper -${{ inputs.version }}" --body "${{ inputs.env_changes }}" --base "main"
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}