Skip to content

Commit

Permalink
github-actions(updatecli): use GitHub secrets (#13197)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored May 29, 2024
1 parent 68ce1e0 commit 6bfe353
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .ci/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sources:
owner: golang
repository: go
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
versionfilter:
kind: regex
pattern: go1\.{{ source "minor" }}\.\d*$
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/bump-elastic-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ jobs:
with:
ref: ${{ matrix.branch }}

- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
- uses: elastic/oblt-actions/updatecli/[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-elastic-stack-snapshot.yml
command: '--experimental apply'
command: --experimental apply --config .ci/bump-elastic-stack-snapshot.yml
env:
BRANCH: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/[email protected]
with:
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>"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
17 changes: 11 additions & 6 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ jobs:
steps:

- uses: actions/checkout@v4
- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current

- uses: elastic/oblt-actions/updatecli/[email protected]
with:
command: --experimental apply --config .ci/bump-golang.yml
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- uses: elastic/oblt-actions/slack/[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-golang.yml
command: '--experimental apply'
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>"
25 changes: 12 additions & 13 deletions .github/workflows/update-beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,21 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}

- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current

- uses: elastic/oblt-actions/updatecli/[email protected]
with:
command: --experimental apply --config .ci/update-beats.yml
env:
BRANCH_NAME: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/update-beats.yml
command: '--experimental apply'
- if: failure()
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
slackChannel: "#apm-server"
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>"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit 6bfe353

Please sign in to comment.