App Check DeviceCheck provider #122
Workflow file for this run
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: TeamCity Services Diff Check | |
permissions: read-all | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/teamcity-services-diff-check.yml' | |
- 'mmv1/third_party/terraform/.teamcity/components/inputs/services_ga.kt' | |
- 'mmv1/third_party/terraform/.teamcity/components/inputs/services_beta.kt' | |
- 'mmv1/products/**' | |
jobs: | |
check-pr: | |
runs-on: ubuntu-22.04 | |
outputs: | |
services: ${{steps.services.outputs.services}} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "Check for New Services" | |
id: services | |
run: | | |
newServices=$(($(git diff --name-only --diff-filter=A origin/main HEAD | grep -P "mmv1/products/.*/product.yaml" | wc -l))) | |
echo "services=$newServices" >> "${GITHUB_OUTPUT}" | |
if [ "$newServices" = "0" ];then | |
echo "No new service found." | |
fi | |
terraform-provider-google: | |
if: ${{needs.check-pr.outputs.services != '0'}} | |
needs: check-pr | |
uses: ./.github/workflows/build-downstream.yml | |
with: | |
repo: 'terraform-provider-google' | |
terraform-provider-google-beta: | |
if: ${{needs.check-pr.outputs.services != '0'}} | |
needs: check-pr | |
uses: ./.github/workflows/build-downstream.yml | |
with: | |
repo: 'terraform-provider-google-beta' | |
teamcity-services-diff-check: | |
needs: [terraform-provider-google, terraform-provider-google-beta] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20' | |
- name: Download built artifacts - GA provider | |
uses: actions/download-artifact@v2 | |
with: | |
name: artifact-terraform-provider-google | |
path: artifacts | |
- name: Unzip the artifacts and delete the zip | |
run: | | |
unzip -o artifacts/output.zip -d ./provider | |
rm artifacts/output.zip | |
- name: Download built artifacts - Beta provider | |
uses: actions/download-artifact@v2 | |
with: | |
name: artifact-terraform-provider-google-beta | |
path: artifacts | |
- name: Unzip the artifacts and delete the zip | |
run: | | |
unzip -o artifacts/output.zip -d ./provider | |
rm artifacts/output.zip | |
- name: Check that new services have been added to the TeamCity configuration code | |
run: | | |
# Create lists of service packages in providers | |
ls provider/google/services > tools/teamcity-diff-check/services_ga.txt | |
ls provider/google-beta/services > tools/teamcity-diff-check/services_beta.txt | |
# Run tool to compare service packages in the providers vs those listed in TeamCity config files | |
cd tools/teamcity-diff-check | |
go run main.go -service_file=services_ga | |
go run main.go -service_file=services_beta |