-
Notifications
You must be signed in to change notification settings - Fork 193
57 lines (49 loc) · 1.68 KB
/
auto-stack-update.yml
File metadata and controls
57 lines (49 loc) · 1.68 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
name: Auto Stack Update
on:
schedule:
- cron: '0 0 * * 3'
workflow_dispatch:
inputs:
stack:
type: choice
description: 'Stack to update'
options:
- all
- node
- python
- php
- dotnet
jobs:
update:
strategy:
fail-fast: false
matrix:
stack: ${{ github.event_name == 'workflow_dispatch' && inputs.stack != 'all' && fromJSON(format('["{0}"]', inputs.stack)) || fromJSON('["node","python","php","dotnet"]') }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check for updates
id: check
run: |
python .github/auto-update/auto-update-stack.py --stack ${{ matrix.stack }}
- name: Get month name
id: month
run: echo "name=$(date +'%B %Y')" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: steps.check.outputs.no_updates != 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.STACK_UPDATE_PAT }}
title: "[${{ steps.month.outputs.name }}][${{ matrix.stack }}] Update: ${{ steps.check.outputs.summary }}"
branch: auto-update/${{ matrix.stack }}
commit-message: "Update ${{ matrix.stack }} to latest upstream version"
body: |
Automated stack version update for **${{ matrix.stack }}**.
Updated `images/constants.yml` and `versionsToBuild.txt` from upstream release APIs.
Please verify the versions and SHAs are correct before merging.