Skip to content

Commit 321efa1

Browse files
committed
try new action
1 parent 0f248c5 commit 321efa1

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

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

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,39 @@ jobs:
2626
private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
2727
owner: ${{ github.repository_owner }}
2828
repositories: backup-utils,backup-utils-private
29-
# - name: Checkout backup-utils-private
30-
# uses: actions/checkout@v4
31-
# with:
32-
# token: ${{ steps.app-token.outputs.token }}
33-
# repository: github/backup-utils-private
34-
# path: ./backup-utils-private
3529
- name: Checkout backup-utils
3630
uses: actions/checkout@v4
3731
with:
3832
token: ${{ steps.app-token.outputs.token }}
3933
repository: github/backup-utils
40-
- name: Create empty commit in backup-utils
41-
id: empty-commit
42-
env:
43-
ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
34+
# set GITHUB_TOKEN to the app token
35+
- name: Set GITHUB_TOKEN
4436
run: |
45-
git config user.name "release-controller[bot]"
46-
git config user.email "[email protected]"
47-
git remote set-url origin https://[email protected]/github/backup-utils.git
48-
git fetch origin tims-test-branch
49-
git checkout tims-test-branch
50-
git commit --allow-empty -m "${{ github.event.inputs.version }} release"
51-
git push origin tims-test-branch
52-
echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
37+
echo "GITHUB_TOKEN=${{ steps.app-token.outputs.token }}" >> $GITHUB_ENV
38+
- uses: stefanzweifel/git-auto-commit-action@v4
39+
id: empty-commit
40+
with:
41+
branch: tims-test-branch
42+
commit_message: "${{ github.event.inputs.version }} release"
43+
commit_options: "--allow-empty"
44+
token: ${{ steps.app-token.outputs.token }}
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
5358
# create tags for the build scripts to work
5459
# if empty_commit is successful, then echo success
5560
- name: Echo success
56-
if: ${{ steps.empty_commit.outcome == 'success' }}
61+
if: ${{ steps.empty-commit.outcome == 'success' }}
5762
run: |
5863
echo "empty commit successful"
5964
# - name: Create tag

0 commit comments

Comments
 (0)