20
20
21
21
jobs :
22
22
build :
23
+ name : build
23
24
runs-on : ubuntu-latest
25
+ outputs :
26
+ token : ${{ steps.app-token.outputs.token }}
24
27
steps :
25
28
- uses : actions/create-github-app-token@v1
26
29
id : app-token
@@ -74,20 +77,13 @@ jobs:
74
77
runs-on : ubuntu-latest
75
78
outputs :
76
79
commit_hash : ${{ steps.empty-commit.outputs.commit_hash }}
77
- release-commit : ${{ steps.resolve-release-commit.outputs.release-commit }}
80
+ release-ref-or- commit : ${{ steps.resolve-release-commit.outputs.release-ref-or -commit }}
78
81
steps :
79
- - uses : actions/create-github-app-token@v1
80
- id : app-token
81
- with :
82
- app-id : ${{ vars.RELEASE_CONTROLLER_APP_ID }}
83
- private-key : ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
84
- owner : ${{ github.repository_owner }}
85
- repositories : " backup-utils,backup-utils-private"
86
82
- name : Checkout backup-utils
87
83
if : github.event.inputs.branch-ref-or-commit == ''
88
84
uses : actions/checkout@v4
89
85
with :
90
- token : ${{ steps.app-token .outputs.token }}
86
+ token : ${{ needs.build .outputs.token }}
91
87
repository : github/backup-utils
92
88
ref : master
93
89
- name : Create empty commit
@@ -107,16 +103,16 @@ jobs:
107
103
run : |
108
104
if [[ -z "${{ github.event.inputs.branch-ref-or-commit }}" ]]; then
109
105
echo "Using empty commit sha for release commit"
110
- echo "release-commit=\"${{ steps.empty-commit.outputs.commit_hash }}\"" >> "$GITHUB_OUTPUT"
106
+ echo "release-ref-or- commit=\"${{ steps.empty-commit.outputs.commit_hash }}\"" >> "$GITHUB_OUTPUT"
111
107
else
112
108
echo "Using provided commit sha for release commit"
113
- echo "release-commit=\"${{ github.event.inputs.branch-ref-or-commit }}\"" >> "$GITHUB_OUTPUT"
109
+ echo "release-ref-or- commit=\"${{ github.event.inputs.branch-ref-or-commit }}\"" >> "$GITHUB_OUTPUT"
114
110
fi
115
111
# need backup-utils-private for release notes
116
112
- name : Checkout backup-utils-private
117
113
uses : actions/checkout@v4
118
114
with :
119
- token : ${{ steps.app-token .outputs.token }}
115
+ token : ${{ needs.build .outputs.token }}
120
116
repository : github/backup-utils-private
121
117
- name : Download deb artifact
122
118
uses : actions/download-artifact@v3
@@ -129,7 +125,7 @@ jobs:
129
125
- name : Create Release
130
126
uses : ncipollo/release-action@v1
131
127
with :
132
- token : ${{ steps.app-token .outputs.token }}
128
+ token : ${{ needs.build .outputs.token }}
133
129
owner : github
134
130
repo : backup-utils
135
131
name : |
@@ -138,7 +134,7 @@ jobs:
138
134
github-backup-utils-v${{ github.event.inputs.version }}.tar.gz, \
139
135
github-backup-utils_${{ github.event.inputs.version }}_all.deb
140
136
tag : v${{ github.event.inputs.version }}
141
- commit : ${{ steps.resolve-release-commit.outputs.release-commit }}
137
+ commit : ${{ steps.resolve-release-commit.outputs.release-ref-or- commit }}
142
138
bodyFile : release-notes/${{ github.event.inputs.version }}.md
143
139
draft : ${{ github.event.inputs.draft }}
144
140
allowUpdates : true
0 commit comments