-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tokens for foundations updates
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,12 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Fetch Dependabot metadata | ||
id: dependabot-metadata | ||
uses: dependabot/[email protected] | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Setup NPM | ||
run: | | ||
nvm install | ||
|
@@ -54,10 +60,26 @@ jobs: | |
./gradlew assemble${{ env.flavour }}${{ env.config }} -PdisablePreDex | ||
- name: Tokens check | ||
if: !contains(steps.dependabot-metadata.outputs.dependency-names, 'bpk-') | ||
run: | | ||
./gradlew generateTokens -PdisablePreDex | ||
./scripts/check-no-changes.sh | ||
- name: Token update | ||
if: contains(steps.dependabot-metadata.outputs.dependency-names, 'bpk-') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
./gradlew generateTokens -PdisablePreDex | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git remote set-url origin https://x-access-token:[email protected]/${{ github.repository }} | ||
git fetch origin $GITHUB_HEAD_REF | ||
git checkout $GITHUB_HEAD_REF | ||
git add . | ||
git diff-index --quiet HEAD || git commit -m "Update tokens" | ||
git push | ||
- name: Detekt check | ||
run: ./gradlew detekt -PdisablePreDex | ||
|
||
|