-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use access-token and add slack notification
- Loading branch information
1 parent
801f796
commit e8717a9
Showing
1 changed file
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
||
|
@@ -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" |