-
Notifications
You must be signed in to change notification settings - Fork 26
93 lines (82 loc) · 3.09 KB
/
update_os_libraries.yml
File metadata and controls
93 lines (82 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Check OS Library Updates
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
permissions: {}
jobs:
fetch-extensions:
name: Fetch target extensions
runs-on: ubuntu-24.04
outputs:
extensions: ${{ steps.get-extensions.outputs.extensions }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Fetch extensions
id: get-extensions-dagger
uses: dagger/dagger-for-github@27b130bf0f79a7f6fbbbe0fbca6760dc9bb40a77 # v8.4.1
env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.20.3
with:
version: ${{ env.DAGGER_VERSION }}
verb: call
module: ./dagger/maintenance/
args: get-oslibs-targets
- name: Set extensions output
id: get-extensions
env:
EXTENSIONS_OUTPUT: ${{ steps.get-extensions-dagger.outputs.output }}
run: |
EXTENSIONS="${EXTENSIONS_OUTPUT}"
echo "extensions=$(echo "$EXTENSIONS" | jq -c .)" >> $GITHUB_OUTPUT
update-extension-os-libs:
name: Update OS libs for ${{ matrix.extension }}
runs-on: ubuntu-24.04
needs:
- fetch-extensions
strategy:
matrix:
extension: ${{ fromJson(needs.fetch-extensions.outputs.extensions) }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Log in to the GitHub Container registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Update OS libs for ${{ matrix.extension }}
uses: dagger/dagger-for-github@27b130bf0f79a7f6fbbbe0fbca6760dc9bb40a77 # v8.4.1
env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.20.3
with:
version: ${{ env.DAGGER_VERSION }}
verb: call
module: ./dagger/maintenance/
args: update-oslibs --target ${{ matrix.extension }} export --path=.
- name: Diff
run: |
git status
git diff
- name: Create a PR if versions have been updated on main
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
if: github.ref == 'refs/heads/main'
with:
token: ${{ secrets.REPO_GHA_PAT }}
title: "chore: update ${{ matrix.extension }} OS libraries"
body: "Updating the OS libraries of ${{ matrix.extension }}"
branch: "${{ matrix.extension }}-os-libraries"
author: "extension-os-libs-updater <extension-os-libs-updater@users.noreply.github.com>"
add-paths: |
${{ matrix.extension }}/system-libs/**
commit-message: "chore: update ${{ matrix.extension }} OS libraries"
signoff: true