diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 668fc9a..60852f1 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -44,10 +44,17 @@ on: required: false default: linux/amd64,linux/arm64 type: string + repo-owner: + description: 'The publish job only runs if repository owner matches this value, so it will not run on forks.' + required: false + default: 'FAIRDataTeam' + type: string jobs: - build: + publish: runs-on: ubuntu-latest + # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-only-run-job-for-specific-repository + if: github.repository_owner == inputs.repo-owner steps: - # https://github.com/actions/checkout name: Clone git repo diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index b0fd712..c3fdbcc 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -31,10 +31,17 @@ on: default: '' required: false type: string + repo-owner: + description: 'The publish job only runs if repository owner matches this value, so it will not run on forks.' + required: false + default: 'FAIRDataTeam' + type: string jobs: publish: runs-on: ubuntu-latest + # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-only-run-job-for-specific-repository + if: github.repository_owner == inputs.repo-owner steps: # https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven # https://github.com/actions/setup-java