Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Set and use GH_SLACK_USERNAME_MAP as an environment variable #2055

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/staging-frontend-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ runs:
steps:
- name: Set the Slack user
shell: python
env:
GH_SLACK_USERNAME_MAP: ${{ secrets.GH_SLACK_USERNAME_MAP }}
run: |
import json
import os
mapping = json.loads("${{ toJSON(secrets.GH_SLACK_USERNAME_MAP) }}")
mapping = json.loads("${{ toJSON(env.GH_SLACK_USERNAME_MAP) }}")
github_user = "${{ github.triggering_actor }}"
slack_id = mapping[github_user]
with open(os.getenv('GITHUB_ENV'), "a") as env_file:
Expand Down