Skip to content

Commit e406d8d

Browse files
committed
Unify workflows
1 parent 9dfc5d4 commit e406d8d

3 files changed

Lines changed: 7 additions & 27 deletions

File tree

.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

0 commit comments

Comments
 (0)