diff --git a/.github/workflows/release-bundle-to-charmhub.yaml b/.github/workflows/release-bundle-to-charmhub.yaml index c95b6a0c..a9f51706 100644 --- a/.github/workflows/release-bundle-to-charmhub.yaml +++ b/.github/workflows/release-bundle-to-charmhub.yaml @@ -16,26 +16,32 @@ jobs: get-releases-affected: runs-on: ubuntu-22.04 name: Get releases affected + outputs: + releases_affected: ${{ steps.get-releases-affected.outputs.RELEASES_AFFECTED_LIST }} steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Get changed files + - name: Get files changed id: changed-files uses: tj-actions/changed-files@v37 - - name: Echo files - run: | - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - echo "$file was changed" - done + - name: Get releases affected + id: get-releases-affected + run: python .github/workflows/test.py + # run: bash .github/workflows/get-releases + # for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + # echo "$file was changed" + # done + # get-releases-affected: # [..] # run-tests-for-releases-affected: + # needs: get-releases-affected # [..] # publish-charm: diff --git a/.github/workflows/test.py b/.github/workflows/test.py new file mode 100644 index 00000000..dc7afd24 --- /dev/null +++ b/.github/workflows/test.py @@ -0,0 +1,34 @@ +# file="asdas/releases/1.6/stable/kubeflow/bundle.yaml" +# pattern="^releases+" + +# if [[ $file =~ $pattern ]]; then +# echo "string matcehs" +# else +# echo "String does not match the regex pattern" +# fi +# from tenacity import retry, stop_after_attempt, wait_fixed +import sys +def main() -> None: + for arg in sys.argv: + print(arg) + # print(sys.argv) + # count = 0 + # if len(sys.argv)>1: + # region_name = sys.argv[1] + # if validate_region(region_name): + # count = delete_volumes_in_region(region_name, count) + # else: + # print("Region from input isn't being used in this AWS account.") + # raise Exception + # else: + # ec2 = boto3.client("ec2") + # for region in ec2.describe_regions()["Regions"]: + # region_name = region["RegionName"] + # count = delete_volumes_in_region(region_name, count) + + # if count > 0: + # print(f"Deleted {count} unattached volumes.") + # else: + # print("No unattached volumes found for deletion.") + +main()