-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (41 loc) · 1.31 KB
/
check-valid-env.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Check valid env.yml
on:
pull_request:
paths:
- 'env.yml'
jobs:
check-env:
name: Check env.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Env Valid
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 #v1.9.0
with:
micromamba-version: '1.5.8-0'
environment-file: env.yml
environment-name: test-access-ram-environment
generate-run-shell: false
# TODO: Remove this once we have a better versioning solution than a VERSION file
check-version:
name: Check VERSION
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
version:
- 'VERSION'
- name: Comment if VERSION not modified
if: steps.filter.outputs.version == 'false'
uses: access-nri/actions/.github/actions/pr-comment@main
with:
comment: |
:x: `VERSION` file must be updated before this PR is merged to deploy :x:
- name: Error if VERSION not modified
if: steps.filter.outputs.version == 'false'
run: |
echo "::error::Version must be modified in this PR"
exit 1