Bump black from 23.11.0 to 23.12.1 (#232) #33
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
name: Deploy Dataflow Flex Template | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "**.py" | |
- "cloudbuild.yaml" | |
- "Dockerfile" | |
- "flex_template_metadata_*.json" | |
- "requirements.txt" | |
jobs: | |
deploy: | |
name: Deploy Dataflow Flex Template | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GCP_SA_KEY }}' | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v2 | |
- name: Build flex templates | |
id: build_flex_template | |
run: echo "BUILD_TAG=$(./build_flex_template.sh | tail -1)" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Check BUILD_TAG | |
# Fail the run if the BUILD_TAG is empty | |
if: ${{ steps.build_flex_template.outputs.BUILD_TAG == '' }} | |
run: exit 1 | |
- name: Update Cloud Workflow build tag | |
# yamllint disable rule:line-length | |
run: sed -ri 's/^(\s*-\sflexTemplateBuildTag:)(\s".*"$)/\1 "${{ steps.build_flex_template.outputs.BUILD_TAG }}"/' data-pipeline.workflows.yaml | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
add-paths: | | |
data-pipeline.workflows.yaml | |
branch-suffix: timestamp | |
commit-message: Bump dataflow flex template build tag | |
title: Bump dataflow flex template build tag | |
body: | | |
Bump dataflow flex template build tag to: ${{ steps.build_flex_template.outputs.BUILD_TAG }} | |
If this is the only change, and it has not accidently blanked this out, then you can safely merge this to use the latest build on the next run. | |
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |