Skip to content

Commit

Permalink
use access-token and add slack notification
Browse files Browse the repository at this point in the history
  • Loading branch information
dany-pellerin committed Dec 2, 2024
1 parent 801f796 commit e8717a9
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
- uses: "google-github-actions/auth@v2"
id: auth
with:
token_format: "access_token"
workload_identity_provider: ${{ env.workload_identity_provider }}
service_account: ${{ env.service-account }}

Expand All @@ -156,7 +157,39 @@ jobs:
with:
registry: us-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.auth_token }}
password: ${{ steps.auth.outputs.access_token }}

- name: Publish web-sdk-demos to us-docker.pkg.dev
run: docker push us-docker.pkg.dev/optable-artifact-registry/optable/optable-web-sdk-demos:${{ github.ref_name }}

slack-notification:
needs: [tests-prettier, build, deploy-sdk-to-npm, define-gcs-versions-to-update, deploy-sdk-to-gcs, deploy-demo]
runs-on: ubuntu-22.04
if: ${{ failure() }}
steps:
- name: Post to Slack
uses: slackapi/[email protected]
with:
method: chat.postMessage
token: "${{ secrets.SLACK_MESSENGER_APP_TOKEN }}"
payload: |
channel: "${{ vars.ALERTS_SLACK_CHANNEL_ID }}"
text: "Release Optable-web-sdk: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
blocks:
- type: "header"
text:
type: "plain_text"
text: ":crybot: Release Optable-web-sdk"
emoji: true
- type: "section"
fields:
- type: "mrkdwn"
text: "*Status:*\n${{ job.status }}"
- type: "mrkdwn"
text: "*Branch:*\n${{ github.ref_name }}"
- type: "mrkdwn"
text: "*Author:*\n${{ github.actor || github.triggering_actor }}"
- type: "mrkdwn"
text: ":x: *Workflow run:*\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- type: "mrkdwn"
text: "*Mentions:*\n@here"

0 comments on commit e8717a9

Please sign in to comment.