updatecli-compose #544
This file contains hidden or 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
| --- | |
| 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 }} |