Skip to content

updatecli: use updatecli policies (#13934) #94

updatecli: use updatecli policies (#13934)

updatecli: use updatecli policies (#13934) #94

Workflow file for this run

---
name: bump-golang
on:
workflow_dispatch:
schedule:
- cron: '0 20 * * 6'
permissions:
contents: read
jobs:
labels:
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
backports: ${{ steps.labels.outputs.backports }}
steps:
- id: generate
name: Generate matrix
uses: elastic/apm-pipeline-library/.github/actions/elastic-stack-snapshot-branches@current
with:
exclude-branches: '7.17,main'
- uses: actions/github-script@v7
id: labels
env:
BRANCHES: ${{ steps.generate.outputs.branches }}
with:
script: |
// We only support the latest minor version
const branches = JSON.parse(process.env.BRANCHES)
.sort((a, b) => parseFloat(b) - parseFloat(a));
const latest = branches[0]
core.setOutput("backports", `backport-${branches[0].trim()}`)
bump:
runs-on: ubuntu-latest
needs: [labels]
steps:
- uses: actions/checkout@v4
<<<<<<< HEAD

Check failure on line 44 in .github/workflows/bump-golang.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/bump-golang.yml

Invalid workflow file

You have an error in your yaml syntax on line 44
- uses: elastic/oblt-actions/updatecli/[email protected]
=======
- uses: elastic/oblt-actions/updatecli/run@v1
>>>>>>> 3351902f8 (updatecli: use updatecli policies (#13934))
with:
command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_BRANCH: 'main'
GITHUB_LABELS: ${{ needs.labels.outputs.backports }}
- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/send@v1
bump-7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: '7.17'
- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_BRANCH: '7.17'
GITHUB_LABELS: 'backport-skip'
notify:
runs-on: ubuntu-latest
needs: [bump, bump-7]
if: always()
steps:
- id: check
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
with:
needs: ${{ toJSON(needs) }}
- if: ${{ steps.check.outputs.isSuccess == 'false' }}
uses: elastic/oblt-actions/slack/send@v1
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-server"
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"