Update artifact version [Main] #161
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
# This workflow removes any assets created for manual QA testing | |
# from the GitHub Wiki repository once a pull request is closed. | |
# | |
# See https://github.com/google/web-stories-wp/issues/1398 | |
name: Clean up PR assets | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
remove-pr: | |
name: Cleanup storage | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
repository: ${{ github.repository }}.wiki | |
ref: master | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prune PR files | |
run: | | |
rm -rf "refs/pull/${{ github.event.pull_request.number }}" | |
git add . | |
git status | |
git diff --staged --quiet && echo 'No changes to commit; exiting!' && exit 0 | |
git commit -m "Prune refs/pull/${{ github.event.pull_request.number }}" | |
git pull --rebase | |
git push origin master | |
env: | |
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com | |
GIT_AUTHOR_NAME: ${{ github.actor }} | |
GIT_COMMITTER_EMAIL: ${{ github.actor }}@users.noreply.github.com | |
GIT_COMMITTER_NAME: ${{ github.actor }} |