add commit new file part #4
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: Check NC <->C DL | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Micromamba Python | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-name: GHA | |
init-shell: bash | |
create-args: >- | |
python=3 netcdf4 --channel conda-forge | |
- name: Convert NC files to CDL and back | |
shell: bash -l {0} | |
run: | | |
python convert_nc_cdl.py | |
- name: Get current date | |
run: echo "NOW=$(date -u)" >> ${GITHUB_ENV} | |
- name: Create Pull Request | |
if: github.ref == 'refs/heads/main' | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Latest data: ${{ env.NOW }}" | |
branch: update-gold-standard-files | |
delete-branch: true | |
title: "[file-conversion-ci] update gold standard file" | |
body: | | |
Update gold-standard files. | |
labels: | | |
Bot | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |