Skip to content

Commit

Permalink
wip4
Browse files Browse the repository at this point in the history
  • Loading branch information
orfeas-k committed Aug 9, 2023
1 parent 32674ef commit 7f18acb
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/release-bundle-to-charmhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 7f18acb

Please sign in to comment.