From 6cf70b2d998435a5a6ab06bfc5cb7b8892cd0826 Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Tue, 22 Oct 2024 19:00:18 +0100 Subject: [PATCH] visibility --- .github/workflows/build-and-publish-pre-release.yml | 2 +- .github/workflows/build-and-publish-release.yml | 2 +- .github/workflows/create-prs-for-stale-branches.yml | 4 +++- .github/workflows/pr-lint.yml | 4 +++- .github/workflows/pull-request.yml | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-publish-pre-release.yml b/.github/workflows/build-and-publish-pre-release.yml index c8c2af4b..8f7f25af 100644 --- a/.github/workflows/build-and-publish-pre-release.yml +++ b/.github/workflows/build-and-publish-pre-release.yml @@ -44,7 +44,7 @@ jobs: fetch-depth: 0 fetch-tags: true - - if: inputs.REPO_STATUS == '' + - if: env.REPO_STATUS == '' name: "Check Repo Visibility" uses: credfeto/action-repo-visibility@v1.2.0 id: visibility diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index 8267b23a..cc64002e 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -35,7 +35,7 @@ jobs: fetch-depth: 0 fetch-tags: true - - if: inputs.REPO_STATUS == '' + - if: env.REPO_STATUS == '' name: "Check Repo Visibility" uses: credfeto/action-repo-visibility@v1.2.0 id: visibility diff --git a/.github/workflows/create-prs-for-stale-branches.yml b/.github/workflows/create-prs-for-stale-branches.yml index 8a9f6f1b..1a065171 100644 --- a/.github/workflows/create-prs-for-stale-branches.yml +++ b/.github/workflows/create-prs-for-stale-branches.yml @@ -67,6 +67,7 @@ jobs: BRANCH: ${{matrix.branch}} CREATE_DRAFT: true REPO_STATUS: private + steps: - name: "Initialise Workspace" if: startsWith(runner.name, 'buildagent-') @@ -81,7 +82,8 @@ jobs: ref: main repository: ${{github.repository}} - - name: "Check Repo Visibility" + - if: env.REPO_STATUS == '' + name: "Check Repo Visibility" if: github.repository_owner != 'funfair-tech' uses: credfeto/action-repo-visibility@v1.2.0 id: visibility diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 9826cc93..31817a0f 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -16,6 +16,7 @@ concurrency: env: HEAD_REF: ${{github.head_ref}} BASE_REF: ${{github.base_ref}} + REPO_STATUS: private jobs: info: if: endsWith(github.repository, '-template') @@ -296,7 +297,8 @@ jobs: shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - - name: "Check repo visibility" + - if: env.REPO_STATUS == '' + name: "Check repo visibility" uses: credfeto/action-repo-visibility@v1.2.0 id: visibility with: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8a7fdd8c..fc816ff2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -86,7 +86,7 @@ jobs: run: echo "COMMIT_MSG=$(git log -1 --pretty=%B)" >> "$GITHUB_ENV" - name: "Check Repo Visibility" - if: steps.findPr.outputs.number == '' + if: env.REPO_STATUS == '' &&steps.findPr.outputs.number == '' uses: credfeto/action-repo-visibility@v1.2.0 id: visibility with: