From b68cfb6b7a7852721f301234c36fdf496ad6a546 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Thu, 8 Aug 2024 17:09:03 +0200 Subject: [PATCH] updatecli: pass the username to fix the issue with auth (#10739) Pin version v2.64.0 Set username to solve the issues with the authentication needed. Simplify GitHub action to use a folder with all the pipelines Restructure the folder layout for the updatecli, updatecli.d for pipelines and values.d for configuration files. Co-authored-by: Victor Martinez --- .github/workflows/bump-elastic-stack-version.yml | 14 ++++---------- .../updatecli.d/bump-latest-7x-version.yml | 1 + .../updatecli.d/bump-latest-snapshot-version.yml | 1 + .../{updatecli.d => updatecli/values.d}/scm.yml | 0 4 files changed, 6 insertions(+), 10 deletions(-) rename .github/workflows/{ => updatecli}/updatecli.d/bump-latest-7x-version.yml (95%) rename .github/workflows/{ => updatecli}/updatecli.d/bump-latest-snapshot-version.yml (95%) rename .github/workflows/{updatecli.d => updatecli/values.d}/scm.yml (100%) diff --git a/.github/workflows/bump-elastic-stack-version.yml b/.github/workflows/bump-elastic-stack-version.yml index c3182297576..dc2957d8137 100644 --- a/.github/workflows/bump-elastic-stack-version.yml +++ b/.github/workflows/bump-elastic-stack-version.yml @@ -7,7 +7,7 @@ on: - cron: '0 1 * * 1-5' pull_request: paths: - - .github/updatecli.d/* + - .github/workflows/updatecli/** - .github/workflows/bump-elastic-stack-version.yml permissions: @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Updatecli in the runner - uses: updatecli/updatecli-action@v2.62.0 + uses: updatecli/updatecli-action@3a8785d88ec4fa03d86521a181f37c0e74627463 #v2.64.0 - name: Select diff action if: ${{ github.event_name == 'pull_request' }} @@ -37,14 +37,8 @@ jobs: run: | echo "UPDATECLI_ACTION=apply" >> $GITHUB_ENV - - name: Update latest testing 7.x stack version + - name: Update latest testing stack versions # --experimental needed for commitusingapi option. - run: updatecli --experimental ${{ env.UPDATECLI_ACTION }} --config .github/workflows/updatecli.d/bump-latest-7x-version.yml --values .github/workflows/updatecli.d/scm.yml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Update latest testing stack version - # --experimental needed for commitusingapi option. - run: updatecli --experimental ${{ env.UPDATECLI_ACTION }} --config .github/workflows/updatecli.d/bump-latest-snapshot-version.yml --values .github/workflows/updatecli.d/scm.yml + run: updatecli --experimental ${{ env.UPDATECLI_ACTION }} --config .github/workflows/updatecli/updatecli.d --values .github/workflows/updatecli/values.d/scm.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/updatecli.d/bump-latest-7x-version.yml b/.github/workflows/updatecli/updatecli.d/bump-latest-7x-version.yml similarity index 95% rename from .github/workflows/updatecli.d/bump-latest-7x-version.yml rename to .github/workflows/updatecli/updatecli.d/bump-latest-7x-version.yml index 697b7d75b98..a5d83b4fa81 100644 --- a/.github/workflows/updatecli.d/bump-latest-7x-version.yml +++ b/.github/workflows/updatecli/updatecli.d/bump-latest-7x-version.yml @@ -19,6 +19,7 @@ scms: owner: '{{ .scm.owner }}' repository: '{{ .scm.repository }}' user: '{{ requiredEnv "GITHUB_ACTOR" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' token: '{{ requiredEnv "GITHUB_TOKEN" }}' commitusingapi: true branch: main diff --git a/.github/workflows/updatecli.d/bump-latest-snapshot-version.yml b/.github/workflows/updatecli/updatecli.d/bump-latest-snapshot-version.yml similarity index 95% rename from .github/workflows/updatecli.d/bump-latest-snapshot-version.yml rename to .github/workflows/updatecli/updatecli.d/bump-latest-snapshot-version.yml index 65267d2403c..d4ca8b55c39 100644 --- a/.github/workflows/updatecli.d/bump-latest-snapshot-version.yml +++ b/.github/workflows/updatecli/updatecli.d/bump-latest-snapshot-version.yml @@ -19,6 +19,7 @@ scms: owner: '{{ .scm.owner }}' repository: '{{ .scm.repository }}' user: '{{ requiredEnv "GITHUB_ACTOR" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' token: '{{ requiredEnv "GITHUB_TOKEN" }}' commitusingapi: true branch: main diff --git a/.github/workflows/updatecli.d/scm.yml b/.github/workflows/updatecli/values.d/scm.yml similarity index 100% rename from .github/workflows/updatecli.d/scm.yml rename to .github/workflows/updatecli/values.d/scm.yml