Skip to content

Commit 91e4663

Browse files
authored
Merge pull request #14 from devilbox/actions
Unify workflows
2 parents 9dfc5d4 + 57654fb commit 91e4663

File tree

7 files changed

+11
-31
lines changed

7 files changed

+11
-31
lines changed

.github/workflows/action_branch.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ name: build
1010
# When to run
1111
# -------------------------------------------------------------------------------------------------
1212
on:
13-
# Runs after merge to master and after tag creation
1413
push:
15-
branches:
16-
- master
17-
- release-*
18-
tags:
19-
- '*'
14+
2015

2116
jobs:
2217

@@ -30,7 +25,7 @@ jobs:
3025
uses: devilbox/github-actions/.github/workflows/docker-name-version-arch.yml@master
3126
with:
3227
enabled: true
33-
can_deploy: true
28+
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
3429
name: ${{ needs.params.outputs.name }}
3530
matrix: ${{ needs.params.outputs.matrix }}
3631
refs: ${{ needs.params.outputs.refs }}

.github/workflows/action_pull_request.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ name: build
1010
# When to run
1111
# -------------------------------------------------------------------------------------------------
1212
on:
13-
# Runs on Pull Requests
14-
pull_request_target:
13+
pull_request:
1514

1615

1716
jobs:
1817

1918
# (1/2) Determine repository params
2019
params:
2120
uses: ./.github/workflows/params.yml
21+
# Only run for forks (contributor)
22+
if: github.event.pull_request.head.repo.fork
2223

2324
# (2/2) Build
2425
docker:

.github/workflows/lint.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,12 @@ name: lint
1111
# -------------------------------------------------------------------------------------------------
1212
on:
1313
# Runs on Pull Requests
14-
pull_request_target:
14+
pull_request:
1515

1616

1717
# -------------------------------------------------------------------------------------------------
1818
# What to run
1919
# -------------------------------------------------------------------------------------------------
2020
jobs:
2121
lint:
22-
name: "Lint"
23-
runs-on: ubuntu-latest
24-
steps:
25-
# ------------------------------------------------------------
26-
# Setup repository
27-
# ------------------------------------------------------------
28-
- name: Checkout repository
29-
uses: actions/checkout@v3
30-
with:
31-
fetch-depth: 0
32-
33-
# ------------------------------------------------------------
34-
# Lint repository
35-
# ------------------------------------------------------------
36-
- name: Lint
37-
run: |
38-
make lint
22+
uses: devilbox/github-actions/.github/workflows/lint-generic.yml@master

tests/00-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TAG="${3}"
1010
#ARCH="${4}"
1111

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

1616
# Ensure they all have a common entrypoint

tests/01-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TAG="${3}"
1010
ARCH="${4}"
1111

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

1616

tests/02-mysqli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARCH="${4}"
1111
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
1212

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

1717

tests/03-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TAG="${3}"
1111
ARCH="${4}"
1212

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

1717

0 commit comments

Comments
 (0)