You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2022/07/16 13:53:11 UTC

[beam] branch master updated: Merge pull request #22300 from Fixed [Playground] DeployExamples, modified "get difference

This is an automated email from the ASF dual-hosted git repository.

pabloem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a42b96ed88 Merge pull request #22300 from Fixed [Playground] DeployExamples, modified "get difference
2a42b96ed88 is described below

commit 2a42b96ed88ed2d35c365a39d762e9ee00d5a6ad
Author: MakarkinSAkvelon <67...@users.noreply.github.com>
AuthorDate: Sat Jul 16 18:53:04 2022 +0500

    Merge pull request #22300 from Fixed [Playground] DeployExamples, modified "get difference
---
 .github/workflows/playground_deploy_examples.yml | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/playground_deploy_examples.yml b/.github/workflows/playground_deploy_examples.yml
index 9e55ecb9963..712025624e3 100644
--- a/.github/workflows/playground_deploy_examples.yml
+++ b/.github/workflows/playground_deploy_examples.yml
@@ -16,10 +16,10 @@
 name: Collect And Deploy Playground Examples
 
 on:
-  push:
-    tags: 'v*'
-    branches: ['master', 'release-*']
-  workflow_dispatch:
+  pull_request:
+    types:
+      - closed
+    branches: ['master']
 env:
   BEAM_ROOT_DIR: ../../
   BEAM_EXAMPLE_CATEGORIES: ../categories.yaml
@@ -47,13 +47,9 @@ jobs:
         name: get Difference
         id: check_file_changed
         run: |
-          $diff = git diff --name-only origin/master
+          $diff = git diff --name-only ${{ github.event.before }} ${{ github.event.after }}
+          echo "$diff"
           Write-Host "::set-output name=example_diff::$diff"
-      - name: Setup GCP account
-        run: |
-             echo "${{ secrets.GCP_PLAYGROUND_SA_KEY }}" | base64 -d > /tmp/gcp_access.json
-             which gcloud
-             gcloud auth activate-service-account --project=apache-beam-testing --key-file=/tmp/gcp_access.json
       - name: has Examples
         run: |
           output=$(python3 checker.py ${{ steps.check_file_changed.outputs.example_diff }})
@@ -99,7 +95,7 @@ jobs:
         run: |
              echo "${{ secrets.GCP_PLAYGROUND_SA_KEY }}" | base64 -d > /tmp/gcp_access.json
              which gcloud
-             gcloud auth activate-service-account --project=apache-beam-testing --key-file=/tmp/gcp_access.json
+             gcloud auth activate-service-account --project=${{ secrets.GCP_PLAYGROUND_PROJECT_ID }} --key-file=/tmp/gcp_access.json
       - name: Set Docker Tag
         run: echo "DOCKERTAG=${GITHUB_SHA}" >> $GITHUB_ENV
       - name: Set Docker Tag If Github Tag was trigger