Skip to content

Commit ccc9570

Browse files
authored
github-action: pass user/email for the github action bot (#3571)
1 parent da45b70 commit ccc9570

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

.github/workflows/bump-elastic-stack-snapshot.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,30 @@ jobs:
3535
uses: updatecli/updatecli-action@9a37c7e35598d7b37d8e7568b40ed9538112be01 # v0.76.1
3636

3737
- name: Run Updatecli in Apply mode
38-
run: updatecli --experimental apply --config .ci/bump-elastic-stack-snapshot.yml
38+
run: updatecli apply --config .ci/bump-elastic-stack-snapshot.yml
3939
env:
4040
BRANCH: ${{ matrix.branch }}
4141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
GIT_USER: "github-actions[bot]"
43+
GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
4244

4345
- if: ${{ failure() }}
4446
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
4547
with:
4648
channel-id: '#fleet-notifications'
47-
payload: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@fleet_team` please look what's going on <${{ env.JOB_URL }}|here>"
49+
payload: |
50+
{
51+
"text": "${{ env.MESSAGE }}",
52+
"blocks": [
53+
{
54+
"type": "section",
55+
"text": {
56+
"type": "mrkdwn",
57+
"text": "${{ env.MESSAGE }}"
58+
}
59+
}
60+
]
61+
}
4862
env:
4963
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
64+
MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@fleet_team` please look what's going on <${{ env.JOB_URL }}|here>"

.github/workflows/bump-golang.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,29 @@ jobs:
2626
uses: updatecli/updatecli-action@9a37c7e35598d7b37d8e7568b40ed9538112be01 # v0.76.1
2727

2828
- name: Run Updatecli in Apply mode
29-
run: updatecli --experimental apply --config .ci/bump-golang.yml
29+
run: updatecli apply --config .ci/bump-golang.yml
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
GIT_USER: "github-actions[bot]"
33+
GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
3234

3335
- if: ${{ failure() }}
3436
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
3537
with:
3638
channel-id: '#fleet-notifications'
37-
payload: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@fleet_team` please look what's going on <${{ env.JOB_URL }}|here>"
39+
payload: |
40+
{
41+
"text": "${{ env.MESSAGE }}",
42+
"blocks": [
43+
{
44+
"type": "section",
45+
"text": {
46+
"type": "mrkdwn",
47+
"text": "${{ env.MESSAGE }}"
48+
}
49+
}
50+
]
51+
}
3852
env:
3953
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
54+
MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@fleet_team` please look what's going on <${{ env.JOB_URL }}|here>"

0 commit comments

Comments
 (0)