Test removing licence data file #8003
Workflow file for this run
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: Rebuild Licence data file | |
on: | |
push: | |
branches: [ trunk, develop, develop-clone ] | |
pull_request: | |
branches: [ trunk, develop, develop-clone ] | |
jobs: | |
licence: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set commit status as pending | |
uses: myrotvorets/set-commit-status-action@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: pending | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Find file | |
run: find ./licence-data.php | |
id: find | |
continue-on-error: true | |
- name: Add a file | |
if: ${{ steps.find.outcome == 'failure' }} | |
run: git checkout origin/trunk licence-data.php | |
id: add | |
- name: Commit the missing file | |
id: commit | |
if: ${{ steps.add.outcome == 'success' }} | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Adds missing licence-data.php file | |
commit_user_name: WP-media GitHub Actions Bot | |
- name: Find file again | |
run: find ./licence-data.php | |
id: findagain | |
continue-on-error: true | |
- name: Set final commit status only when we find the file at the end | |
if: ${{ steps.findagain.outcome == 'failure' }} | |
uses: myrotvorets/set-commit-status-action@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: success |