Skip to content

Commit

Permalink
Try github-push-action
Browse files Browse the repository at this point in the history
  • Loading branch information
narin committed Nov 22, 2023
1 parent 5af2941 commit 9b47549
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }}
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: 'Set up GH CLI secret'
run: echo "${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }}" >> token.txt
- name: 'Log into GH CLI'
Expand Down Expand Up @@ -80,8 +81,6 @@ jobs:
echo "GIT_TAG=${{ inputs.package }}-v$NEW_VERSION" >> "$GITHUB_OUTPUT"
- name: Commit package.json changes and tag
run: |
echo "${{ secrets.GITHUB_TOKEN }}" >> token.txt
echo "${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }}" >> token.txt
git config --global user.name 'VA Automation Bot'
git config --global user.email '[email protected]'
git pull
Expand All @@ -92,6 +91,12 @@ jobs:
echo $TAG
git tag -a $TAG -m $TAG
git push origin $TAG
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }}
branch: ${{ github.ref }}
tags: true
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
Expand Down

0 comments on commit 9b47549

Please sign in to comment.