Skip to content

Commit

Permalink
updatecli: add backport labels
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Jul 3, 2024
1 parent 181b053 commit b302d90
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ci/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ actions:
spec:
labels:
- automation
- backport-skip
- dependencies
- '{{ default env "GITHUB_LABELS" "backport-skip" }}'
description: |-
### What
Bump go release version with the latest release.
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,31 @@ 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: |
const branches = JSON.parse(process.env.BRANCHES)
const prefixedStrings = branches.map((str) => `backport-${str.trim()}`)
core.setOutput("backports", prefixedStrings.join(","))
bump:
runs-on: ubuntu-latest
needs: [labels]
steps:

- uses: actions/checkout@v4
Expand All @@ -22,6 +45,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_BRANCH: 'main'
GITHUB_LABELS: ${{ needs.labels.outputs.backports }}

bump-7:
runs-on: ubuntu-latest
Expand Down

0 comments on commit b302d90

Please sign in to comment.