Skip to content

Commit

Permalink
Merge pull request #1775 from alan-turing-institute/fix-docker-versio…
Browse files Browse the repository at this point in the history
…ns-script

Fix Docker versions script
  • Loading branch information
jemrobinson authored Apr 9, 2024
2 parents 830b2d4 + 319ee5f commit 6d9c6c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/scripts/update_docker_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def annotate(
return annotated


for filename in (pathlib.Path("data_safe_haven") / "pulumi").glob("**/*.py"):
for filename in (pathlib.Path("data_safe_haven") / "infrastructure").glob("**/*.py"):
needs_replacement = False
lines = []
with open(filename) as f_pulumi:
Expand All @@ -87,6 +87,8 @@ def annotate(
print(f"Updating {image} from {v_current} to {v_latest} in {filename}") # noqa: T201
needs_replacement = True
output = line.replace(v_current, v_latest)
else:
print(f"Leaving {image} at {v_current} (latest version) in {filename}") # noqa: T201
lines += output

if needs_replacement:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/update_docker_versions.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
name: Update Pulumi Docker image versions

# Run workflow on pushes to matching branches
on: # yamllint disable-line rule:truthy
push:
branches: [python-migration]
schedule:
- cron: "0 0 */7 * *" # run once per week
- cron: "0 3 * * 1" # run at 3:00 every Monday
workflow_dispatch: # allow this workflow to be manually triggered

# checkout needs 'contents:read'
Expand Down

0 comments on commit 6d9c6c5

Please sign in to comment.