Skip to content

Commit 2098486

Browse files
authored
Merge pull request #7 from devilbox/release-0.4
Multi-arch images
2 parents 7f01f77 + 1a7955e commit 2098486

22 files changed

+544
-221
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
version: 2
3+
updates:
4+
# Maintain dependencies for GitHub Actions
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "daily"

.github/labels.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# The labels in this file are automatically synced with the repository
2+
# using the micnncim/action-label-syncer action.
3+
---
4+
- name: C-dependency
5+
color: 1abc9c
6+
description: "Category: Dependency"
7+
- name: PR-block
8+
color: 3498db
9+
description: "Pull Request: Do not merge"
10+
- name: PR-merge
11+
color: 3498db
12+
description: "Pull Request: Merge when ready"

.github/release-drafter.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name-template: '$RESOLVED_VERSION 🌈'
3+
tag-template: '$RESOLVED_VERSION'
4+
version-template: '$MAJOR.$MINOR'
5+
categories:
6+
- title: '🚀 Features'
7+
labels:
8+
- 'feature'
9+
- 'enhancement'
10+
- title: '🐛 Bug Fixes'
11+
labels:
12+
- 'fix'
13+
- 'bugfix'
14+
- 'bug'
15+
- title: '🧰 Maintenance'
16+
label: 'chore'
17+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
18+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
19+
version-resolver:
20+
major:
21+
labels:
22+
- 'major'
23+
minor:
24+
labels:
25+
- 'minor'
26+
patch:
27+
labels:
28+
- 'patch'
29+
default: minor
30+
template: |
31+
## Changes
32+
33+
$CHANGES
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: build
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# When to run
11+
# -------------------------------------------------------------------------------------------------
12+
on:
13+
push:
14+
15+
16+
jobs:
17+
18+
# (1/2) Determine repository params
19+
params:
20+
uses: ./.github/workflows/params.yml
21+
22+
# (2/2) Build
23+
docker:
24+
needs: [params]
25+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
26+
with:
27+
enabled: true
28+
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
29+
matrix: ${{ needs.params.outputs.matrix }}
30+
refs: ${{ needs.params.outputs.refs }}
31+
secrets:
32+
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
33+
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: build
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# When to run
11+
# -------------------------------------------------------------------------------------------------
12+
on:
13+
pull_request:
14+
15+
16+
jobs:
17+
18+
# (1/2) Determine repository params
19+
params:
20+
uses: ./.github/workflows/params.yml
21+
# Only run for forks (contributor)
22+
if: github.event.pull_request.head.repo.fork
23+
24+
# (2/2) Build
25+
docker:
26+
needs: [params]
27+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
28+
with:
29+
enabled: true
30+
can_deploy: false
31+
matrix: ${{ needs.params.outputs.matrix }}
32+
refs: ${{ needs.params.outputs.refs }}
33+
secrets:
34+
dockerhub_username: ""
35+
dockerhub_password: ""
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: nightly
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# When to run
11+
# -------------------------------------------------------------------------------------------------
12+
on:
13+
# Runs daily
14+
schedule:
15+
- cron: '0 0 * * *'
16+
17+
18+
jobs:
19+
20+
# (1/2) Determine repository params
21+
params:
22+
uses: ./.github/workflows/params.yml
23+
24+
# (2/2) Build
25+
docker:
26+
needs: [params]
27+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
28+
with:
29+
enabled: true
30+
can_deploy: true
31+
matrix: ${{ needs.params.outputs.matrix }}
32+
refs: ${{ needs.params.outputs.refs }}
33+
secrets:
34+
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
35+
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: lint
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# When to run
11+
# -------------------------------------------------------------------------------------------------
12+
on:
13+
# Runs on Pull Requests
14+
pull_request:
15+
16+
17+
# -------------------------------------------------------------------------------------------------
18+
# What to run
19+
# -------------------------------------------------------------------------------------------------
20+
jobs:
21+
lint:
22+
uses: devilbox/github-actions/.github/workflows/lint-generic.yml@master

.github/workflows/params.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: params
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# Custom Variables
11+
# -------------------------------------------------------------------------------------------------
12+
env:
13+
MATRIX: >-
14+
[
15+
{
16+
"NAME": "ngrok",
17+
"VERSION": ["2"],
18+
"FLAVOUR": ["latest", "stretch", "alpine"],
19+
"ARCH": ["linux/amd64", "linux/386", "linux/arm64"]
20+
}
21+
]
22+
23+
24+
# -------------------------------------------------------------------------------------------------
25+
# When to run
26+
# -------------------------------------------------------------------------------------------------
27+
on:
28+
workflow_call:
29+
outputs:
30+
matrix:
31+
description: "The determined version matrix"
32+
value: ${{ jobs.params.outputs.matrix }}
33+
refs:
34+
description: "The determined git ref matrix (only during scheduled run)"
35+
value: ${{ jobs.params.outputs.refs }}
36+
37+
jobs:
38+
params:
39+
runs-on: ubuntu-latest
40+
41+
outputs:
42+
matrix: ${{ steps.set-matrix.outputs.matrix }}
43+
refs: ${{ steps.set-refs.outputs.matrix }}
44+
45+
steps:
46+
- name: "[Set-Output] Matrix"
47+
id: set-matrix
48+
run: |
49+
echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )"
50+
51+
- name: "[Set-Output] Matrix 'Refs' (master branch and latest tag)"
52+
id: set-refs
53+
uses: cytopia/[email protected]
54+
with:
55+
repository_default_branch: master
56+
branches: master
57+
num_latest_tags: 1
58+
if: github.event_name == 'schedule'
59+
60+
- name: "[DEBUG] Show settings'"
61+
run: |
62+
echo 'Matrix'
63+
echo '--------------------'
64+
echo '${{ steps.set-matrix.outputs.matrix }}'
65+
echo
66+
67+
echo 'Matrix: Refs'
68+
echo '--------------------'
69+
echo '${{ steps.set-matrix-refs.outputs.matrix }}'
70+
echo
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Release Drafter
3+
4+
on:
5+
push:
6+
# branches to consider in the event; optional, defaults to all
7+
branches:
8+
- master
9+
10+
jobs:
11+
update_release_draft:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Drafts your next Release notes as Pull Requests are merged into "master"
15+
- uses: release-drafter/release-drafter@v5
16+
with:
17+
publish: true
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN }}

.github/workflows/repository.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Repository
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- .github/labels.yml
10+
11+
jobs:
12+
labels:
13+
name: Labels
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Sync labels
21+
uses: micnncim/action-label-syncer@v1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
manifest: .github/labels.yml

0 commit comments

Comments
 (0)