Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Simplify step for setting the Slack user in GH action (#2058)

Krystle Salazaref8794f4c601
diff --git a/.github/actions/staging-frontend-deploy/action.yml b/.github/actions/staging-frontend-deploy/action.yml
index 1cc93bf5a..5ebe699fd 100644
--- a/.github/actions/staging-frontend-deploy/action.yml
+++ b/.github/actions/staging-frontend-deploy/action.yml
@@ -26,17 +26,8 @@ runs:
steps:
- name: Set the Slack user
- shell: python
- env:
- GH_SLACK_USERNAME_MAP: ${{ inputs.gh-slack-username-map }}
- run: |
- import json
- import os
- mapping = json.loads('${{ 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:
- env_file.write(f"SLACK_USER_ID={slack_id}")
+ shell: bash
+ run: echo "SLACK_USER_ID=${{ inputs.gh-slack-username-map[github.actor] }}" >> "$GITHUB_ENV"
- name: Notify deployment start
uses: slackapi/[email protected]
diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml
index 9d6f41f2d..2562b47ad 100644
--- a/.github/workflows/gh-pages.yaml
+++ b/.github/workflows/gh-pages.yaml
@@ -11,6 +11,7 @@ concurrency:
jobs:
deploy:
+ name: Deploy GitHub pages
runs-on: ubuntu-latest
steps:
- name: Checkout