Skip to content

Commit

Permalink
Update tokens for foundations updates
Browse files Browse the repository at this point in the history
  • Loading branch information
marianeum committed Apr 17, 2024
1 parent b116000 commit 009107c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 009107c

Please sign in to comment.