-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (63 loc) · 2.13 KB
/
open-stack.yml
File metadata and controls
72 lines (63 loc) · 2.13 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
name: Update OpenStack template files
on:
# Uncomment following lines to enable periodically check
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:
inputs:
version:
description: Target version
default: latest
required: true
node:
type: choice
description: Node version
required: false
options:
- ""
- 20.x
- 18.x
- 16.x
- 14.x
- 12.x
dry:
type: boolean
description: Dry mode
default: false
permissions: write-all
jobs:
update:
runs-on: ubuntu-latest
env:
NODE_VERSION: ${{ github.event.inputs.node || vars.NODE_VERSION || '16.x' }}
TARGET: ${{ github.event.inputs.version || 'latest' }}
BRANCH: ${{ vars.UPDATE_STACK_BRANCH || 'actions/open-stack-update' }}
REPOSITORY: ${{ secrets.UPDATE_STACK_REPOSITORY || vars.UPDATE_STACK_REPOSITORY || 'https://github.com/klientjs/open-stack.git' }}
DRY: ${{ github.event.inputs.dry == 'true' }}
REPORT: /tmp/open-stack-report.md
CACHE: ${{ vars.CACHE_DEPENDENCIES != '0' && 'npm' || '' }}
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: ${{ env.CACHE }}
- name: Check stability
run: npm install --ignore-scripts && npm run check
- name: Upgrade OpenStack CLI
run: npm update @klient/open-stack-cli
- name: Update Stack
run: npm run update:open-stack -- --to $TARGET --report $REPORT --repository $REPOSITORY --verbose
- name: Pre commit
run: npm install --ignore-scripts && npm run pre-commit
- name: Create Pull Request
if: env.DRY == 'false'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT || github.token }}
title: "[OPEN-STACK] Update to ${{ env.TARGET }}"
commit-message: "chore(stack): update to ${{ env.TARGET }}"
body-path: ${{ env.REPORT }}
branch: ${{ env.BRANCH }}
delete-branch: true