diff --git a/.github/workflows/upgrade_reusable.yml b/.github/workflows/upgrade_reusable.yml deleted file mode 100644 index d6778f6..0000000 --- a/.github/workflows/upgrade_reusable.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Upgrade (reusable) - -on: - workflow_call: - inputs: - ref: - type: string - required: false - description: The github-mgmt-template ref to upgrade to - default: master - secrets: - GITHUB_APP_ID: - required: true - GITHUB_APP_INSTALLATION_ID: - required: true - GITHUB_APP_PEM_FILE: - required: true - -jobs: - upgrade: - name: Upgrade - runs-on: ubuntu-latest - defaults: - run: - shell: bash - steps: - - name: Generate app token - id: token - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 - with: - app_id: ${{ secrets.GITHUB_APP_ID }} - installation_retrieval_mode: id - installation_retrieval_payload: ${{ secrets.GITHUB_APP_INSTALLATION_ID }} - private_key: ${{ secrets.GITHUB_APP_PEM_FILE }} - - name: Checkout GitHub Management template - uses: actions/checkout@v4 - with: - repository: pl-strflt/github-mgmt-template - path: github-mgmt-template - ref: ${{ github.event.inputs.ref }} - - name: Checkout GitHub Management - uses: actions/checkout@v4 - with: - path: github-mgmt - token: ${{ steps.token.outputs.token }} - - name: Copy files from the template - run: | - for file in $(git ls-files ':!:github/*.yml' ':!:scripts/src/actions/fix-yaml-config.ts' ':!:terraform/*_override.tf' ':!:.github/dependabot.yml' ':!:.github/workflows/*_reusable.yml' ':!:README.md'); do - mkdir -p "../github-mgmt/$(dirname "${file}")" - cp -f "${file}" "../github-mgmt/${file}" - done - working-directory: github-mgmt-template - - uses: ./github-mgmt-template/.github/actions/git-config-user - - run: | - git add --all - git diff-index --quiet HEAD || git commit --message="upgrade@${GITHUB_RUN_ID}" - working-directory: github-mgmt - - uses: ./github-mgmt-template/.github/actions/git-push - env: - GITHUB_TOKEN: ${{ steps.token.outputs.token }} - with: - suffix: upgrade - working-directory: github-mgmt diff --git a/CHANGELOG.md b/CHANGELOG.md index d27cd10..1aa33aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,3 +73,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - how sync handles pending invitations (now it does not ignore them) - removed references to other resources from for_each expressions - downgraded terraform to 1.2.9 to fix an import bug affecting for_each expressions +- refactored pages build_type assignment to trim whitespace diff --git a/terraform/resources.tf b/terraform/resources.tf index 8ba0fde..73a03cb 100644 --- a/terraform/resources.tf +++ b/terraform/resources.tf @@ -74,7 +74,7 @@ resource "github_repository" "this" { dynamic "pages" { for_each = try(each.value.pages, []) content { - build_type = try(pages.value["build_type"], null) + build_type = trimspace(try(pages.value["build_type"], "")) != "" ? pages.value["build_type"] : null cname = try(pages.value["cname"], null) dynamic "source" { for_each = pages.value["source"]