From 106e386cca39e7530bc4c904587619efe433cadc Mon Sep 17 00:00:00 2001 From: maru Date: Tue, 13 Feb 2024 09:16:05 +0900 Subject: [PATCH] Skip depup if the latest version doesn't match x.y.z (#10) --- .github/workflows/depup.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/depup.yml b/.github/workflows/depup.yml index 9acd550..1f64d33 100644 --- a/.github/workflows/depup.yml +++ b/.github/workflows/depup.yml @@ -48,8 +48,17 @@ jobs: file: Dockerfile version_name: TERRAFORM_VERSION repo: hashicorp/terraform + - name: Check if the latest version matches x.y.z + id: check_version + run: | + if [[ "${{ steps.depup.outputs.latest }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "match=true" >> "$GITHUB_OUTPUT" + else + echo "match=false" >> "$GITHUB_OUTPUT" + fi - name: Create Pull Request + if: steps.check_version.outputs.match == 'true' uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }}