updating projects yaml files #195
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: CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
fetchProjects: | |
name: Update projects information | |
if: ${{ github.event.head_commit.committer.name != 'svc-cedille-user' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Fetch projects informations | |
run: make fetch-projects PAT_TOKEN=${{ secrets.PAT_TOKEN }} | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v17 | |
id: verify-changed-files | |
with: | |
files: | | |
./data/projects/done/*.yml | |
./data/projects/inProgress/*.yml | |
- name: Commit and push changes | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "svc-cedille-user" | |
git add . | |
git commit -m "updating projects yaml files" | |
- if : steps.verify-changed-files.outputs.files_changed == 'true' | |
name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch : ${{ github.head_ref }} | |
github_token: ${{ secrets.PAT_TOKEN }} | |
force: true |