-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 2.1 KB
/
remove_old_pr.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
47
48
49
50
# Run every third day starting from the 2nd of the month 4 am pacific
name: Remove PR old association
on:
workflow_dispatch:
schedule:
- cron: '0 11 2-31/3 * *'
jobs:
find_new:
name: Find new associations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.5.1
- name: Run diff
env:
UAT_TOKEN_TEMP: ${{ secrets.LAUNCHPAD_TOKEN_UAT }}
OPS_TOKEN_TEMP: ${{ secrets.LAUNCHPAD_TOKEN_OPS }}
run: |
poetry install
ls $GITHUB_WORKSPACE/tests/cmr/concise/uat/ > $GITHUB_WORKSPACE/tests/cmr/concise/uat_associations.txt
ls $GITHUB_WORKSPACE/tests/cmr/concise/ops/ > $GITHUB_WORKSPACE/tests/cmr/concise/ops_associations.txt
poetry run cmr_association_diff -e uat -t service -p POCLOUD -n 'PODAAC Concise' -a $GITHUB_WORKSPACE/tests/cmr/concise/uat_associations.txt --token $UAT_TOKEN_TEMP > $GITHUB_WORKSPACE/tests/cmr/concise/new_uat_associations.txt
poetry run cmr_association_diff -e ops -t service -p POCLOUD -n 'PODAAC Concise' -a $GITHUB_WORKSPACE/tests/cmr/concise/ops_associations.txt --token $OPS_TOKEN_TEMP > $GITHUB_WORKSPACE/tests/cmr/concise/new_ops_associations.txt
poetry run python tests/collection_names.py --env uat --token $UAT_TOKEN_TEMP --file $GITHUB_WORKSPACE/tests/cmr/concise/new_uat_associations.txt
poetry run python tests/collection_names.py --env ops --token $OPS_TOKEN_TEMP --file $GITHUB_WORKSPACE/tests/cmr/concise/new_ops_associations.txt
rm $GITHUB_WORKSPACE/tests/cmr/concise/uat_associations.txt
rm $GITHUB_WORKSPACE/tests/cmr/concise/ops_associations.txt
rm $GITHUB_WORKSPACE/tests/cmr/concise/new_uat_associations.txt
rm $GITHUB_WORKSPACE/tests/cmr/concise/new_ops_associations.txt
- name: Remove Old prs
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
poetry run python tests/remove_prs.py