forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.51 KB
/
updatecli-compose.yml
File metadata and controls
57 lines (50 loc) · 1.51 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: updatecli-compose
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * *"
permissions:
contents: read
jobs:
setup-matrix:
if: github.repository == 'elastic/elasticsearch'
runs-on: ubuntu-latest
outputs:
branches: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: |
BRANCHES=$(jq -c '[.branches[].branch]' branches.json)
echo "matrix=$BRANCHES" >> $GITHUB_OUTPUT
compose:
needs: setup-matrix
if: github.repository == 'elastic/elasticsearch'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: ${{ fromJson(needs.setup-matrix.outputs.branches) }}
permissions:
contents: write
packages: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Update branch in SCM values
run: |
yq eval '.scm.branch = "${{ matrix.branch }}"' -i .github/updatecli/values.d/scm.yml
- uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: elastic/oblt-actions/updatecli/run@v1
with:
# Runs in "--debug" mode to provide logs if the PR creation fails
command: --experimental compose apply --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}