Skip to content

Commit

Permalink
Always try to use PAT prior to GITHUB_TOKEN (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperWA authored Feb 7, 2023
1 parent fa135fb commit 31860cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
- name: Update changelog
uses: CharMixer/auto-changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
release_branch: ${{ inputs.release_branch }}
exclude_tags_regex: "${{ inputs.changelog_exclude_tags_regex }}"
exclude_labels: "${{ inputs.changelog_exclude_labels }}"
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
- name: Create release-specific changelog
uses: CharMixer/auto-changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
release_branch: ${{ inputs.release_branch }}
since_tag: "${{ env.PREVIOUS_VERSION }}"
output: "release_changelog.md"
Expand All @@ -241,7 +241,7 @@ jobs:
cat release_changelog.md >> release_body.md
gh api /repos/${{ github.repository }}/releases/${{ github.event.release.id }} -X PATCH -F body='@release_body.md'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}

- name: Publish package to TestPyPI
if: inputs.test && inputs.publish_on_pypi && inputs.python_package
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd_updated_default_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
echo "RELEASE_RUN=false" >> $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}

- name: Checkout ${{ github.repository }}
if: env.RELEASE_RUN == 'false'
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:
if: env.RELEASE_RUN == 'false'
uses: CharMixer/auto-changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
release_branch: ${{ inputs.default_repo_branch }}
exclude_tags_regex: "${{ inputs.changelog_exclude_tags_regex }}"
exclude_labels: "${{ inputs.changelog_exclude_labels }}"
Expand Down Expand Up @@ -342,7 +342,7 @@ jobs:
fi
if [ -f ".tmp_file.txt" ]; then rm -f .tmp_file.txt; fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}

- name: Push to '${{ inputs.permanent_dependencies_branch }}'
if: "! inputs.test"
Expand Down

0 comments on commit 31860cb

Please sign in to comment.