Cleanup staging branch on delete #1
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
name: Cleanup staging branch on delete | |
on: | |
delete: | |
env: | |
ROT13_STAGING_OWNER: ${{ secrets.ROT13_STAGING_OWNER }} | |
ROT13_UPSTREAM_OWNER: ${{ secrets.ROT13_UPSTREAM_OWNER }} | |
ROT13_UPSTREAM_BRANCH: ${{ secrets.ROT13_UPSTREAM_BRANCH }} | |
jobs: | |
Delete-From-Staging: | |
name: Delete branch from staging | |
runs-on: ubuntu-latest | |
permissions: | |
# Read-only access so we don't accidentally try to push to *this* repository. | |
contents: read | |
# Only run on the private repository. | |
if: github.event.repository.private | |
steps: | |
- name: Detect configuration. | |
uses: The-OpenROAD-Project/actions/auto_config@main | |
- name: Delete branch from staging repository. | |
uses: The-OpenROAD-Project/actions/delete_from@main | |
continue-on-error: true | |
with: | |
owner: ${{ env.STAGING_OWNER }} | |
repo: ${{ env.STAGING_REPO }} | |
branch: ${{ env.STAGING_BRANCH }} | |
deployToken: ${{ secrets.STAGING_GITHUB_TOKEN }} |