Skip to content

Commit

Permalink
Merge pull request #14 from devilbox/actions
Browse files Browse the repository at this point in the history
Unify workflows
  • Loading branch information
cytopia authored Mar 6, 2022
2 parents 9dfc5d4 + 57654fb commit 91e4663
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 31 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/action_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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 }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/action_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ name: build
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request_target:
pull_request:


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:
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,12 @@ name: lint
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request_target:
pull_request:


# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
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
2 changes: 1 addition & 1 deletion tests/00-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/01-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TAG="${3}"
ARCH="${4}"

CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
# shellcheck disable=SC1090
# shellcheck disable=SC1091
. "${CWD}/.lib.sh"


Expand Down
2 changes: 1 addition & 1 deletion tests/02-mysqli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
2 changes: 1 addition & 1 deletion tests/03-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TAG="${3}"
ARCH="${4}"

CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
# shellcheck disable=SC1090
# shellcheck disable=SC1091
. "${CWD}/.lib.sh"


Expand Down

0 comments on commit 91e4663

Please sign in to comment.