Skip to content

Commit d96598f

Browse files
authored
Merge pull request #21 from wayofdev/feat/refactor
2 parents b1ce43f + 50cdecc commit d96598f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+439
-1635
lines changed

.ansible-lint

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
3+
# https://ansible-lint.readthedocs.io/en/latest/configuring/
4+
5+
skip_list:
6+
- experimental
7+
8+
exclude_paths:
9+
- ./contrib
10+
- ./.venv
11+
12+
...

.github/dependabot.yml

-16
This file was deleted.

.github/labeler.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
3+
# this file is for the labeler workflow job
4+
# Documentation https://github.com/marketplace/actions/labeler
5+
6+
"type: documentation":
7+
- assets/**/*
8+
- .github/*
9+
- ./*.md
10+
11+
"type: maintenance":
12+
- .github/workflows/*
13+
14+
...

.github/workflows/apply-labels.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
3+
# This workflow will triage pull requests and apply a label based on the
4+
# paths that are modified in the pull request.
5+
#
6+
# To use this workflow, you will need to set up a .github/labeler.yml
7+
# file with configuration. For more information, see:
8+
# https://github.com/actions/labeler/blob/master/README.md
9+
10+
on: # yamllint disable-line rule:truthy
11+
pull_request:
12+
13+
name: 🏷️ Add labels
14+
15+
jobs:
16+
label:
17+
uses: wayofdev/gh-actions/.github/workflows/apply-labels.yml@master
18+
with:
19+
os: ubuntu-latest
20+
secrets:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
...
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
3+
# https://github.com/peter-evans/enable-pull-request-automerge
4+
5+
on: # yamllint disable-line rule:truthy
6+
pull_request:
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
name: 🤞 Auto merge release
13+
14+
jobs:
15+
auto-merge:
16+
uses: wayofdev/gh-actions/.github/workflows/auto-merge-release.yml@master
17+
with:
18+
os: ubuntu-latest
19+
pull-request-number: ${{ github.event.pull_request.number }}
20+
actor: lotyp
21+
merge-method: merge
22+
secrets:
23+
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
24+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
25+
26+
...

.github/workflows/build-latest.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: 🚀 Build docker images with latest tag
10+
11+
jobs:
12+
# https://docs.github.com/en/enterprise-cloud@latest/actions/learn-github-actions/expressions#example-returning-a-json-object
13+
prepare:
14+
runs-on: "ubuntu-latest"
15+
outputs:
16+
matrix: ${{ steps.matrix.outputs.matrix }}
17+
steps:
18+
- name: ⚙️ Generate matrix
19+
id: matrix
20+
run: |
21+
echo 'matrix={
22+
"os_name": ["alpine"],
23+
"php_version": ["8.1", "8.2"],
24+
"php_type": ["fpm", "cli", "supervisord"]
25+
}' | tr -d '\n' >> $GITHUB_OUTPUT
26+
27+
build:
28+
needs: prepare
29+
strategy:
30+
matrix: ${{ fromJson(needs.prepare.outputs.matrix )}}
31+
uses: wayofdev/gh-actions/.github/workflows/build-image.yml@master
32+
with:
33+
os: "ubuntu-latest"
34+
push-to-hub: true
35+
image-namespace: "wayofdev/php-dev"
36+
image-template-path: "./dist/dev"
37+
image-template: ${{ matrix.php_version }}-${{ matrix.php_type }}-${{ matrix.os_name }}
38+
image-version: latest
39+
secrets:
40+
docker-username: ${{ secrets.DOCKER_USERNAME }}
41+
docker-password: ${{ secrets.DOCKER_TOKEN }}
42+
43+
...

.github/workflows/build-release.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
release:
5+
types:
6+
- released
7+
8+
name: 🚀 Build docker images with release tag
9+
10+
jobs:
11+
# https://docs.github.com/en/enterprise-cloud@latest/actions/learn-github-actions/expressions#example-returning-a-json-object
12+
prepare:
13+
runs-on: "ubuntu-latest"
14+
outputs:
15+
matrix: ${{ steps.matrix.outputs.matrix }}
16+
version: ${{ steps.version.outputs.version }}
17+
steps:
18+
- name: ⚙️ Generate matrix
19+
id: matrix
20+
run: |
21+
echo 'matrix={
22+
"os_name": ["alpine"],
23+
"php_version": ["8.1", "8.2"],
24+
"php_type": ["fpm", "cli", "supervisord"]
25+
}' | tr -d '\n' >> $GITHUB_OUTPUT
26+
27+
- name: ⚙️ Get version for image tag
28+
id: version
29+
run: |
30+
version=${{ github.ref_name }}
31+
version=${version#v}
32+
echo "version=$version" >> $GITHUB_OUTPUT
33+
34+
build:
35+
needs: prepare
36+
strategy:
37+
matrix: ${{ fromJson(needs.prepare.outputs.matrix )}}
38+
uses: wayofdev/gh-actions/.github/workflows/build-image.yml@master
39+
with:
40+
os: "ubuntu-latest"
41+
push-to-hub: true
42+
image-namespace: "wayofdev/php-dev"
43+
image-template-path: "./dist/dev"
44+
image-template: ${{ matrix.php_version }}-${{ matrix.php_type }}-${{ matrix.os_name }}
45+
image-version: ${{ needs.prepare.outputs.version }}
46+
secrets:
47+
docker-username: ${{ secrets.DOCKER_USERNAME }}
48+
docker-password: ${{ secrets.DOCKER_TOKEN }}
49+
50+
...

.github/workflows/ci.yml

-114
This file was deleted.

.github/workflows/create-release.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
3+
# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
4+
# https://github.com/google-github-actions/release-please-action#release-types-supported
5+
6+
on: # yamllint disable-line rule:truthy
7+
push:
8+
branches:
9+
- master
10+
11+
name: 📦 Create release
12+
13+
jobs:
14+
release:
15+
uses: wayofdev/gh-actions/.github/workflows/create-release.yml@master
16+
with:
17+
os: ubuntu-latest
18+
branch: master
19+
package-name: docker-php-dev
20+
secrets:
21+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
22+
23+
...

.github/workflows/release-please.yml

-39
This file was deleted.

0 commit comments

Comments
 (0)