diff --git a/.github/workflows/fix.yml b/.github/workflows/fix.yml index 119361ba..8a8a1cd2 100644 --- a/.github/workflows/fix.yml +++ b/.github/workflows/fix.yml @@ -20,10 +20,9 @@ concurrency: jobs: prepare: - # not starting for PRs if repo is private because we cannot write to private forks + # WARN: writing to private forks is not supported if: github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request_target' && - github.event.pull_request.head.repo.private == false) || + github.event_name == 'pull_request_target' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') permissions: @@ -109,7 +108,7 @@ jobs: run: node lib/actions/fix-yaml-config.js working-directory: scripts - name: Upload YAML config - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.TF_WORKSPACE }}.yml path: github/${{ env.TF_WORKSPACE }}.yml @@ -153,7 +152,7 @@ jobs: with: path: base - name: Download YAML configs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: artifacts - name: Copy YAML configs diff --git a/.github/workflows/plan.yml b/.github/workflows/plan.yml index 9f106ef8..24baecf4 100644 --- a/.github/workflows/plan.yml +++ b/.github/workflows/plan.yml @@ -93,7 +93,7 @@ jobs: terraform plan -refresh=false -lock=false -out="${TF_WORKSPACE}.tfplan" -no-color working-directory: terraform - name: Upload terraform plan - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.TF_WORKSPACE }}_${{ github.event.pull_request.head.sha || github.sha }}.tfplan path: terraform/${{ env.TF_WORKSPACE }}.tfplan @@ -130,7 +130,7 @@ jobs: run: terraform init working-directory: terraform - name: Download terraform plans - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: terraform - name: Show terraform plans diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e6bd774..d0497d65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - workflows: not to use deprecated GitHub Actions expressions anymore - tf: to prevent destroy of membership and repository resources - apply: find sha for plan using proper credentials +- updated upload and download artifacts actions to v4 ### Fixed - links to supported resources in HOWTOs diff --git a/terraform/locals.tf b/terraform/locals.tf index 7c19abbc..6bb27f14 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -173,7 +173,7 @@ locals { } : { source = "config" index = repository - archived = config.archived + archived = try(config.archived, false) } ] : item.index => merge(local.sources[item.source].github_repository.this[item.index], { archived = item.archived }) }