Remove PR old association #8
Workflow file for this run
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: Remove PR old association | |
on: | |
workflow_dispatch: | |
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/uat/ > $GITHUB_WORKSPACE/tests/cmr/uat_associations.txt | |
ls $GITHUB_WORKSPACE/tests/cmr/ops/ > $GITHUB_WORKSPACE/tests/cmr/ops_associations.txt | |
poetry run cmr_association_diff -e uat -t service -p POCLOUD -n 'PODAAC L2 Cloud Subsetter' -a $GITHUB_WORKSPACE/tests/cmr/uat_associations.txt --token $UAT_TOKEN_TEMP > $GITHUB_WORKSPACE/tests/cmr/new_uat_associations.txt | |
poetry run cmr_association_diff -e ops -t service -p POCLOUD -n 'PODAAC L2 Cloud Subsetter' -a $GITHUB_WORKSPACE/tests/cmr/ops_associations.txt --token $OPS_TOKEN_TEMP > $GITHUB_WORKSPACE/tests/cmr/new_ops_associations.txt | |
poetry run python tests/collection_names.py --env uat --token $UAT_TOKEN_TEMP --file $GITHUB_WORKSPACE/tests/cmr/new_uat_associations.txt | |
poetry run python tests/collection_names.py --env ops --token $OPS_TOKEN_TEMP --file $GITHUB_WORKSPACE/tests/cmr/new_ops_associations.txt | |
rm $GITHUB_WORKSPACE/tests/cmr/uat_associations.txt | |
rm $GITHUB_WORKSPACE/tests/cmr/ops_associations.txt | |
rm $GITHUB_WORKSPACE/tests/cmr/new_uat_associations.txt | |
rm $GITHUB_WORKSPACE/tests/cmr/new_ops_associations.txt | |
- name: Remove Old prs | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
poetry run python tests/remove_prs.py |