Skip to content

Commit 1539757

Browse files
committed
another test
1 parent 1dff7cc commit 1539757

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

.github/workflows/build-and-release.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
build:
2323
runs-on: ubuntu-latest
2424
steps:
25-
# resulting token still gets denied by the backup-utils repo
26-
# see: https://github.com/actions/create-github-app-token/pull/46
2725
- uses: timreimherr/create-github-app-token@main
2826
id: app-token
2927
with:
@@ -32,9 +30,39 @@ jobs:
3230
private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
3331
owner: ${{ github.repository_owner }}
3432
repositories: backup-utils,backup-utils-private
35-
- name: Print app permissions
33+
- name: Checkout backup-utils
34+
uses: actions/checkout@v4
35+
with:
36+
token: ${{ steps.app-token.outputs.token }}
37+
repository: github/backup-utils
38+
ref: master
39+
- name: Create empty commit in backup-utils
40+
id: empty-commit
3641
run: |
37-
curl -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/app/installations | jq '.'
42+
git config user.name "release-controller[bot]"
43+
git config user.email "223695+release-controller[bot]@users.noreply.github.com"
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 "https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/github/backup-utils.git"
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+
# resulting token still gets denied by the backup-utils repo
54+
# see: https://github.com/actions/create-github-app-token/pull/46
55+
# - uses: timreimherr/create-github-app-token@main
56+
# id: app-token
57+
# with:
58+
# # required
59+
# app_id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
60+
# private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
61+
# owner: ${{ github.repository_owner }}
62+
# repositories: backup-utils,backup-utils-private
63+
# - name: Print app permissions
64+
# run: |
65+
# curl -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/app/installations | jq '.'
3866
# - name: Checkout backup-utils-private
3967
# uses: actions/checkout@v4
4068
# with:

0 commit comments

Comments
 (0)