diff --git a/.github/workflows/call-pr-1-ci.yml b/.github/workflows/call-pr-1-ci.yml deleted file mode 100644 index 57dbf1ba..00000000 --- a/.github/workflows/call-pr-1-ci.yml +++ /dev/null @@ -1,25 +0,0 @@ -# This workflow is used to convert the `.version` in the `metadata.yaml` file into a valid `git tag` on push to `main`. -# We use the `.version` field in that file to denote the version of the config once a PR is merged. -name: pr-1-ci.yml -on: - pull_request: - branches: - - 'release-*' - - 'dev-*' - paths-ignore: - # These are ignored because they don't have anything to do with the model itself - - .github/** - - tools/** - - doc/** - - .* - - README.md -jobs: - call: - # We simply call the workflow on main so we don't have to propagate CI changes to - # multiple config branches all the time. - uses: access-nri/access-om2-configs/.github/workflows/pr-1-ci.yml@main - secrets: inherit - permissions: - contents: write - pull-requests: write - checks: write diff --git a/.github/workflows/call-pr-3-bump-tag.yml b/.github/workflows/call-pr-3-bump-tag.yml deleted file mode 100644 index a9e2e37a..00000000 --- a/.github/workflows/call-pr-3-bump-tag.yml +++ /dev/null @@ -1,19 +0,0 @@ -# This workflow is used to convert the `.version` in the `metadata.yaml` file -# into a valid `git tag` on push to `main`. -# We use the `.version` field in that file to denote the version of the config -# once a PR is merged. -name: Call pr-3-bump-tag.yml -on: - push: - branches: - - 'release-*' - paths: - - 'metadata.yaml' -jobs: - call: - # We simply call the workflow on main so we don't have to propagate CI changes to - # multiple config branches all the time. - uses: access-nri/access-om2-configs/.github/workflows/pr-3-bump-tag.yml@main - secrets: inherit - permissions: - contents: write diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..487ae3b6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI +run-name: CI (${{ github.event_name }}) for ${{ github.ref_name }} +on: + pull_request: + branches: + - 'release-*' + - 'dev-*' + paths-ignore: + # These are ignored because they don't have anything to do with the model itself + - .github/** + - tools/** + - doc/** + - config/** + - .* + - README.md + push: + branches: + - 'release-*' + paths: + - 'metadata.yaml' + issue_comment: + types: + - created + - edited +jobs: + pr: + name: PR + if: github.event_name == 'pull_request' + uses: access-nri/model-config-tests/.github/workflows/config-pr-1-ci.yml@main + secrets: inherit + permissions: + contents: write + pull-requests: write # For pull request comments denoting failure of the workflow + checks: write + + pr-comment: + name: Comment + if: github.event_name == 'issue_comment' + uses: access-nri/model-config-tests/.github/workflows/config-pr-2-confirm.yml@main + secrets: inherit + permissions: + contents: write # For updating metadata.yaml version and committing checksums + pull-requests: write # For commenting on PR + + bump-tag: + name: Tag Bump + if: github.event_name == 'push' + uses: access-nri/model-config-tests/.github/workflows/config-pr-3-bump-tag.yml@main + secrets: inherit + permissions: + contents: write # For creating a new release diff --git a/.github/workflows/validate-json.yml b/.github/workflows/validate-json.yml deleted file mode 100644 index a23beac2..00000000 --- a/.github/workflows/validate-json.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Validate JSON files -on: - pull_request: - branches: - - main - paths: - - '**.json' -jobs: - validate: - name: Validate - uses: access-nri/actions/.github/workflows/validate-json.yml@main - with: - src: "config"