diff --git a/.github/workflows/action_branch.yml b/.github/workflows/action_branch.yml index ccfede4..b102724 100644 --- a/.github/workflows/action_branch.yml +++ b/.github/workflows/action_branch.yml @@ -10,13 +10,8 @@ name: build # When to run # ------------------------------------------------------------------------------------------------- on: - # Runs after merge to master and after tag creation push: - branches: - - master - - release-* - tags: - - '*' + jobs: @@ -30,7 +25,7 @@ jobs: uses: devilbox/github-actions/.github/workflows/docker-name-version-arch.yml@master with: enabled: true - can_deploy: true + can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }} name: ${{ needs.params.outputs.name }} matrix: ${{ needs.params.outputs.matrix }} refs: ${{ needs.params.outputs.refs }} diff --git a/.github/workflows/action_pull_request.yml b/.github/workflows/action_pull_request.yml index 29a60f4..a4e3e96 100644 --- a/.github/workflows/action_pull_request.yml +++ b/.github/workflows/action_pull_request.yml @@ -10,8 +10,7 @@ name: build # When to run # ------------------------------------------------------------------------------------------------- on: - # Runs on Pull Requests - pull_request_target: + pull_request: jobs: @@ -19,6 +18,8 @@ jobs: # (1/2) Determine repository params params: uses: ./.github/workflows/params.yml + # Only run for forks (contributor) + if: github.event.pull_request.head.repo.fork # (2/2) Build docker: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e12df5b..f83d099 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ name: lint # ------------------------------------------------------------------------------------------------- on: # Runs on Pull Requests - pull_request_target: + pull_request: # ------------------------------------------------------------------------------------------------- @@ -19,20 +19,4 @@ on: # ------------------------------------------------------------------------------------------------- jobs: lint: - name: "Lint" - runs-on: ubuntu-latest - steps: - # ------------------------------------------------------------ - # Setup repository - # ------------------------------------------------------------ - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - # ------------------------------------------------------------ - # Lint repository - # ------------------------------------------------------------ - - name: Lint - run: | - make lint + uses: devilbox/github-actions/.github/workflows/lint-generic.yml@master diff --git a/tests/00-entrypoint.sh b/tests/00-entrypoint.sh index 216829e..4def7f3 100755 --- a/tests/00-entrypoint.sh +++ b/tests/00-entrypoint.sh @@ -10,7 +10,7 @@ TAG="${3}" #ARCH="${4}" CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" -# shellcheck disable=SC1090 +# shellcheck disable=SC1091 . "${CWD}/.lib.sh" # Ensure they all have a common entrypoint diff --git a/tests/01-version.sh b/tests/01-version.sh index 43cbda3..5d7b5cc 100755 --- a/tests/01-version.sh +++ b/tests/01-version.sh @@ -10,7 +10,7 @@ TAG="${3}" ARCH="${4}" CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" -# shellcheck disable=SC1090 +# shellcheck disable=SC1091 . "${CWD}/.lib.sh" diff --git a/tests/02-mysqli.sh b/tests/02-mysqli.sh index a62cac0..0fe8e36 100755 --- a/tests/02-mysqli.sh +++ b/tests/02-mysqli.sh @@ -11,7 +11,7 @@ ARCH="${4}" SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" -# shellcheck disable=SC1090 +# shellcheck disable=SC1091 . "${CWD}/.lib.sh" diff --git a/tests/03-config.sh b/tests/03-config.sh index 618c020..468641a 100755 --- a/tests/03-config.sh +++ b/tests/03-config.sh @@ -11,7 +11,7 @@ TAG="${3}" ARCH="${4}" CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" -# shellcheck disable=SC1090 +# shellcheck disable=SC1091 . "${CWD}/.lib.sh"