Add missing resource types #3
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: Open Data CI | |
on: | |
pull_request: | |
branches: | |
- dev | |
paths: | |
- 'src/open-data/*.csv' | |
- 'src/open-data/*.json' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
CI_COMMIT_MESSAGE: Generate PowerShell commands for open data | |
CI_COMMIT_AUTHOR: Open Data CI | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
token: ${{ secrets.GIT_CICD_ACCESS_TOKEN }} | |
- name: Set environment variable "commit-message" | |
run: echo "commit-message=$(git log -1 --pretty=format:'%s')" >> $GITHUB_ENV | |
- name: Set environment variable "commit-author" | |
run: echo "commit-author=$(git log -1 --pretty=format:'%an')" >> $GITHUB_ENV | |
- name: Set environment variable "is-auto-commit" | |
if: env.commit-message == env.CI_COMMIT_MESSAGE && env.commit-author == env.CI_COMMIT_AUTHOR | |
run: echo "is-auto-commit=true" >> $GITHUB_ENV | |
- name: Build Open Data | |
if: env.is-auto-commit == false | |
shell: pwsh | |
run: | | |
src/scripts/Build-OpenData.ps1 -PowerShell | |
if (git status --porcelain) | |
{ | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "[email protected]" | |
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" | |
git push | |
} | |
- name: Test Open Data | |
shell: pwsh | |
run: | | |
src/scripts/Build-OpenData.ps1 -Test |