-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): enable GH-contained auto-updates
- Loading branch information
1 parent
59b6083
commit 8b3e468
Showing
5 changed files
with
155 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
public.ecr.aws/ubuntu/ubuntu:focal@sha256:79b77df393ba7a4d3cb5b1796570196e32c6b57fea8554c4b9c89c7547cea75c |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
public.ecr.aws/ubuntu/ubuntu:jammy@sha256:da15d4a10e27ece78bcab8e36d55762d086238ea05f033ccab108d99af3db68e |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Auto-updates | ||
# TODO: this should be replaced by a charmed Temporal worker listening to the Event Bus | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/base_digests" | ||
branches: | ||
- main | ||
|
||
jobs: | ||
find-updated-bases: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get updated filenames | ||
uses: tj-actions/changed-files@v35 | ||
id: changed-files | ||
with: | ||
json: true | ||
quotepath: false | ||
|
||
- id: set-matrix | ||
run: echo "matrix={\"base\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT" | ||
|
||
check-auto-updates: | ||
name: Check for auto-updates based on ${{ matrix.base }} | ||
runs-on: ubuntu-22.04 | ||
needs: [find-updated-bases] | ||
strategy: | ||
matrix: ${{ fromJSON(needs.find-updated-bases.outputs.matrix) }} | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Setup Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
|
||
- name: Install dependencies | ||
continue-on-error: true | ||
working-directory: src/workflow-engine/charms/temporal-worker | ||
run: poetry install | ||
|
||
- name: Trigger auto-updates | ||
working-directory: src/workflow-engine/charms/temporal-worker/oci_factory/activities/ | ||
env: | ||
OS_AUTH_URL: ${{ secrets.SWIFT_OS_AUTH_URL }} | ||
OS_USERNAME: ${{ secrets.SWIFT_OS_USERNAME }} | ||
OS_PASSWORD: ${{ secrets.SWIFT_OS_PASSWORD }} | ||
OS_PROJECT_NAME: ${{ secrets.SWIFT_OS_TENANT_NAME }} | ||
OS_STORAGE_URL: ${{ secrets.SWIFT_OS_STORAGE_URL }} | ||
GITHUB_TOKEN: ${{ secrets.ROCKSBOT_TOKEN }} | ||
run: poetry run python3 find_images_to_update.py ${{ matrix.base }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"major": { | ||
"enabled": false | ||
}, | ||
"customManagers": [ | ||
{ | ||
"customType": "regex", | ||
"fileMatch": [ | ||
"22.04", | ||
"20.04" | ||
], | ||
"matchStringsStrategy": "any", | ||
"matchStrings": [ | ||
"(?<depName>.*?):(?<currentValue>.*?)@(?<currentDigest>sha256:[a-f0-9]+)\\s" | ||
], | ||
"datasourceTemplate": "docker" | ||
} | ||
] | ||
} |
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