Skip to content

inputdata

inputdata #257

name: inputdata
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
paths:
- 'components/eamxx/cime_config/namelist_defaults_scream.xml'
schedule:
- cron: '00 00 * * *'
workflow_dispatch:
jobs:
scream-defaults:
runs-on: ubuntu-latest
outputs:
event_name: ${{ github.event_name }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
show-progress: false
submodules: false
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run unit tests
working-directory: components/eamxx/cime_config/
run: |
python -m unittest tests/eamxx_default_files.py -v
notify-scream-defaults:
needs: scream-defaults
if: ${{ failure() && needs.scream-defaults.outputs.event_name != 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Create issue
run: |
previous_issue_number=$(gh issue list \
--label "$LABELS" \
--json number \
--jq '.[0].number')
if [[ -n $previous_issue_number ]]; then
gh issue comment "$previous_issue_number" \
--body "$BODY"
else
gh issue create \
--title "$TITLE" \
--assignee "$ASSIGNEES" \
--label "$LABELS" \
--body "$BODY"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
TITLE: Inputdata server file missing
ASSIGNEES: mahf708,bartgol
LABELS: bug,input file,notify-file-gh-action
BODY: |
Workflow failed! There's likely a missing file specified in the configs! For more information, please see:
- Workflow URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (number ${{ github.run_number }}, attempt ${{ github.run_attempt }})
- Workflow SHA: ${{ github.sha }}