Skip to content

Commit

Permalink
chore(deps): update actions/github-script action to v4 (#26)
Browse files Browse the repository at this point in the history
* chore(deps): update actions/github-script action to v4

* chore: update main github workflow

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: co-sic <p.klein@gastromatic.de>
  • Loading branch information
3 people committed Jun 22, 2021
1 parent 21ee7a0 commit 4cee573
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,27 @@ jobs:
- name: Build
run: yarn build
- name: Disable protection temporary
uses: actions/github-script@0.9.0
uses: actions/github-script@v4.0.2
with:
github-token: '${{ secrets.GASTROBOT_TOKEN}}'
script: |
await github.repos.removeProtectedBranchAdminEnforcement({
...context.repo,
await github.repos.deleteAdminBranchProtection({
repo: '${{ github.event.repository.name }}',
owner: '${{ github.repository_owner }}',
branch: 'main',
});
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GASTROBOT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Restore protection
uses: actions/github-script@0.9.0
uses: actions/github-script@v4.0.2
if: always()
with:
github-token: '${{ secrets.GASTROBOT_TOKEN}}'
script: |
await github.repos.addProtectedBranchAdminEnforcement({
...context.repo,
await github.repos.setAdminBranchProtection({
repo: '${{ github.event.repository.name }}',
owner: '${{ github.repository_owner }}',
branch: 'main',
});

0 comments on commit 4cee573

Please sign in to comment.