@@ -4,6 +4,10 @@ name: Build and Release
4
4
on :
5
5
workflow_dispatch :
6
6
inputs :
7
+ gh-token :
8
+ description : ' GitHub Token - used to create a commit in the backup-utils repo'
9
+ required : true
10
+ type : string
7
11
version :
8
12
description : ' Version - patch version of the release (e.g. x.y.z)'
9
13
required : true
@@ -31,37 +35,31 @@ jobs:
31
35
with :
32
36
token : ${{ steps.app-token.outputs.token }}
33
37
repository : github/backup-utils
34
- # set GITHUB_TOKEN to the app token
35
- - name : Set GITHUB_TOKEN
36
- run : |
37
- echo "GITHUB_TOKEN=${{ steps.app-token.outputs.token }}" >> $GITHUB_ENV
38
- - uses : stefanzweifel/git-auto-commit-action@v4
38
+ ref : master
39
+ - name : Create empty commit in backup-utils
39
40
id : empty-commit
40
- with :
41
- branch : tims-test-branch
42
- commit_message : " ${{ github.event.inputs.version }} release"
43
- commit_options : " --allow-empty"
44
- skip_dirty_check : true
45
- # - name: Create empty commit in backup-utils
46
- # id: empty-commit
47
- # env:
48
- # ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
49
- # run: |
50
- # git config user.name "release-controller[bot]"
51
- # git config user.email "[email protected] "
52
- # git remote set-url origin https://[email protected] /github/backup-utils.git
53
- # git fetch origin tims-test-branch
54
- # git checkout tims-test-branch
55
- # git commit --allow-empty -m "${{ github.event.inputs.version }} release"
56
- # git push origin tims-test-branch
57
- # echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
58
- # create tags for the build scripts to work
59
- # if empty_commit is successful, then echo success
60
- - name : Echo success
61
- if : ${{ steps.empty-commit.outcome == 'success' }}
62
41
run : |
63
- echo "empty commit successful"
64
- # - name: Create tag
42
+ git config user.name "timreimherr"
43
+ git config user.email "[email protected] "
44
+ git fetch origin tims-test-branch
45
+ git checkout tims-test-branch
46
+ git commit --allow-empty -m "${{ github.event.inputs.version }} release"
47
+ git push origin tims-test-branch
48
+ echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
49
+ - name : Echo Success if commit was created
50
+ if : steps.empty-commit.outputs.commit-sha != ''
51
+ run : |
52
+ echo "Success"
53
+ # - name: Checkout backup-utils-private
54
+ # uses: actions/checkout@v4
55
+ # with:
56
+ # token: ${{ steps.app-token.outputs.token }}
57
+ # repository: github/backup-utils-private
58
+ # - name: Install dependencies
59
+ # run: |
60
+ # sudo apt-get update -y
61
+ # sudo apt-get install -y moreutils debhelper help2man devscripts gzip
62
+ # - name: Create tag # this is required for the build scripts
65
63
# run: |
66
64
# git config user.name "release-controller[bot]"
67
65
# git config user.email "[email protected] "
@@ -97,38 +95,31 @@ jobs:
97
95
# needs: build
98
96
# runs-on: ubuntu-latest
99
97
# outputs:
100
- # commit-sha: ${{ steps.empty_commit .outputs.commit_sha }}
98
+ # commit-sha: ${{ steps.empty-commit .outputs.commit-sha }}
101
99
# steps:
102
100
# - uses: timreimherr/create-github-app-token@main
103
101
# id: app-token
104
102
# with:
105
- # # required
106
103
# app_id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
107
104
# private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
108
105
# owner: ${{ github.repository_owner }}
109
- # repositories: |
110
- # github/backup-utils
111
- # github/backup-utils-private
112
- # - name: Checkout backup-utils-private
113
- # uses: actions/checkout@v4
114
- # with:
115
- # token: ${{ steps.app-token.outputs.token }}
116
- # repository: github/backup-utils-private
117
- # path: backup-utils-private
106
+ # repositories: backup-utils,backup-utils-private
118
107
# - name: Checkout backup-utils
119
108
# uses: actions/checkout@v4
120
109
# with:
121
110
# token: ${{ steps.app-token.outputs.token }}
122
111
# repository: github/backup-utils
123
112
# ref: master
124
- # path: backup-utils
125
113
# - name: Create empty commit in backup-utils
126
- # id: empty_commit
114
+ # id: empty-commit
127
115
# run: |
128
- # cp ./backup-utils-private/scripts/create-empty-commit \
129
- # .backup-utils/create-empty-commit
130
- # cd ./backup-utils
131
- # ./create-empty-commit
116
+ # git config user.name "release-controller[bot]"
117
+ # git config user.email "[email protected] "
118
+ # git fetch origin tims-test-branch
119
+ # git checkout tims-test-branch
120
+ # git commit --allow-empty -m "${{ github.event.inputs.version }} release"
121
+ # git push origin tims-test-branch
122
+ # echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
132
123
# - name: Download deb artifact
133
124
# uses: actions/download-artifact@v3
134
125
# with:
@@ -151,7 +142,7 @@ jobs:
151
142
# # this action will create a tag with this name on the provided commit
152
143
# tag: v${{ github.event.inputs.version }}
153
144
# # this can be a commit hash or branch name
154
- # commit: ${{ steps.empty_commit .outputs.commit_sha }}
145
+ # commit: ${{ steps.empty-commit .outputs.commit_sha }}
155
146
# bodyFile: release-notes/${{ github.event.inputs.version }}.md
156
147
# draft: ${{ github.event.inputs.draft }}
157
148
# allowUpdates: true
@@ -160,21 +151,3 @@ jobs:
160
151
161
152
162
153
163
-
164
- # - name: Checkout backup-utils-private
165
- # uses: actions/checkout@v4
166
- # with:
167
- # token: ${{ steps.app-token.outputs.token }}
168
- # repository: github/backup-utils-private
169
- # path: backup-utils-private
170
- # - name: Checkout backup-utils
171
- # uses: actions/checkout@v4
172
- # with:
173
- # token: ${{ steps.app-token.outputs.token }}
174
- # repository: github/backup-utils
175
- # ref: master
176
- # path: backup-utils
177
- # - name: Install dependencies
178
- # run: |
179
- # sudo apt-get update -y
180
- # sudo apt-get install -y moreutils debhelper help2man devscripts gzip
0 commit comments