1212 - name : Main Branch Push
1313 run : |
1414 echo "Workflow initiated by event with name: ${{ github.event_name }}"
15- echo "Pushing commit to main: ${{ github.event.head_commit.id }}"
16- echo "Pushed by: ${{ github.event.pusher.name }}"
15+ echo "Pushing commit to main: ${GITHUB_EVENT_HEAD_COMMIT_ID}"
16+ echo "Pushed by: ${GITHUB_EVENT_PUSHER_NAME}"
17+ env :
18+ GITHUB_EVENT_HEAD_COMMIT_ID : ${{ github.event.head_commit.id }}
19+ GITHUB_EVENT_PUSHER_NAME : ${{ github.event.pusher.name }}
1720
1821 - name : Push Notification to Google Chat
1922 run : |
@@ -24,21 +27,21 @@ jobs:
2427 {
2528 "header": {
2629 "title": "Push to main branch",
27- "subtitle": "${{ github.event.head_commit.message } }"
30+ "subtitle": "${GITHUB_EVENT_HEAD_COMMIT_MESSAGE }"
2831 },
2932 "sections": [
3033 {
3134 "widgets": [
3235 {
3336 "keyValue": {
3437 "topLabel": "Repo",
35- "content": "${{ github.event.repository.full_name } }"
38+ "content": "${GITHUB_EVENT_REPOSITORY_FULL_NAME }"
3639 }
3740 },
3841 {
3942 "keyValue": {
4043 "topLabel": "Committed by",
41- "content": "${{ github.event.head_commit.author.username } }"
44+ "content": "${GITHUB_EVENT_HEAD_COMMIT_AUTHOR_USERNAME }"
4245 }
4346 },
4447 {
4851 "text": "Ref comparison",
4952 "onClick": {
5053 "openLink": {
51- "url": "${{ github.event.compare } }"
54+ "url": "${GITHUB_EVENT_COMPARE }"
5255 }
5356 }
5457 }
6164 }
6265 ]
6366 }'
67+ env :
68+ GITHUB_EVENT_HEAD_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
69+ GITHUB_EVENT_REPOSITORY_FULL_NAME : ${{ github.event.repository.full_name }}
70+ GITHUB_EVENT_HEAD_COMMIT_AUTHOR_USERNAME : ${{ github.event.head_commit.author.username }}
71+ GITHUB_EVENT_COMPARE : ${{ github.event.compare }}
6472
0 commit comments