Skip to content

Commit 23bcbbf

Browse files
v1.7.7
Merge pull request #191 from Boerderij/develop
2 parents b3b1876 + 50eb83a commit 23bcbbf

File tree

21 files changed

+270
-206
lines changed

21 files changed

+270
-206
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report
33
about: Create a report to help us improve
44
title: "[BUG]"
5-
labels: awaiting-approval
5+
labels: awaiting-triage
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Feature request
33
about: Suggest an idea for this project
44
title: "[Feature Request]"
5-
labels: awaiting-approval
5+
labels: awaiting-triage
66
assignees: ''
77

88
---
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Docker Multi Login Action'
2+
description: 'Log in to dockerhub, quay, and github container registry'
3+
runs:
4+
using: "composite"
5+
steps:
6+
- shell: bash
7+
run: |
8+
echo "🔑 Logging into dockerhub..."
9+
if docker login --username ${{ fromJSON(env.secrets).DOCKERHUB_USERNAME }} --password ${{ fromJSON(env.secrets).DOCKERHUB_PASSWORD }} > /dev/null 2>&1; then
10+
echo "🎉 Login Succeeded!"
11+
fi
12+
- shell: bash
13+
run: |
14+
echo "🔑 Logging into quay.io..."
15+
if docker login quay.io --username ${{ fromJSON(env.secrets).QUAY_USERNAME }} --password ${{ fromJSON(env.secrets).QUAY_PASSWORD }} > /dev/null 2>&1; then
16+
echo "🎉 Login Succeeded!"
17+
fi
18+
- shell: bash
19+
run: |
20+
echo "🔑 Logging into ghcr.io..."
21+
if docker login ghcr.io --username ${{ fromJSON(env.secrets).GHCR_USERNAME }} --password ${{ fromJSON(env.secrets).GHCR_PASSWORD }} > /dev/null 2>&1; then
22+
echo "🎉 Login Succeeded!"
23+
fi
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'Docker Target Image List Generator'
2+
description: 'A Github Action to generate a list of fully qualified target images for docker related steps'
3+
inputs:
4+
registries:
5+
description: "Comma separated list of docker registries"
6+
required: false
7+
default: "docker.io,quay.io,ghcr.io"
8+
images:
9+
description: "Comma separated list of images"
10+
required: true
11+
tags:
12+
description: "Comma separated list of image tags"
13+
required: false
14+
default: "edge"
15+
outputs:
16+
fully-qualified-target-images:
17+
description: "List of fully qualified docker target images"
18+
value: ${{ steps.gen-fqti.outputs.fully-qualified-target-images }}
19+
runs:
20+
using: "composite"
21+
steps:
22+
- name: Generate fully qualified docker target images
23+
id: gen-fqti
24+
shell: bash
25+
run: |
26+
IFS=',' read -r -a registries <<< "${{ inputs.registries }}"
27+
IFS=',' read -r -a images <<< "${{ inputs.images }}"
28+
IFS=',' read -r -a tags <<< "${{ inputs.tags }}"
29+
FQTI=""
30+
echo "Generating fully qualified docker target images for:"
31+
echo "🐋 Registries: ${#registries[@]}"
32+
echo "📷 Images: ${#images[@]}"
33+
echo "🏷️ Tags: ${#tags[@]}"
34+
echo "🧮 Total: $((${#registries[@]}*${#images[@]}*${#tags[@]}))"
35+
for registry in "${registries[@]}"; do
36+
for image in "${images[@]}"; do
37+
for tag in "${tags[@]}"; do
38+
if [ -z "$FQTI" ]; then
39+
FQTI="${registry}/${image}:${tag}"
40+
else
41+
FQTI="$FQTI,${registry}/${image}:${tag}"
42+
fi
43+
done
44+
done
45+
done
46+
echo ::set-output name=fully-qualified-target-images::${FQTI}

.github/workflows/docker.yaml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: varken
2+
on:
3+
schedule:
4+
- cron: '0 10 * * *'
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
tags:
10+
- 'v*.*.*'
11+
paths:
12+
- '.github/workflows/docker.yaml'
13+
- 'varken/**'
14+
- 'Varken.py'
15+
- 'Dockerfile'
16+
pull_request:
17+
branches:
18+
- master
19+
- develop
20+
paths:
21+
- '.github/workflows/docker.yaml'
22+
- 'varken/**'
23+
- 'Varken.py'
24+
- 'Dockerfile'
25+
workflow_dispatch:
26+
inputs:
27+
tag:
28+
description: 'Use this tag instead of most recent'
29+
required: false
30+
ignore-existing-tag:
31+
description: 'Ignore existing tag if "true"'
32+
required: false
33+
env:
34+
IMAGES: boerderij/varken
35+
PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7"
36+
jobs:
37+
lint-and-test:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v2
42+
- name: Setup Python
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: '3.x'
46+
- name: Lint
47+
run: pip install flake8 && flake8 --max-line-length 120 Varken.py varken/*.py
48+
build:
49+
runs-on: ubuntu-latest
50+
needs: lint-and-test
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v2
54+
- name: Prepare
55+
id: prep
56+
run: |
57+
VERSION=edge
58+
if [[ $GITHUB_REF == refs/tags/* ]]; then
59+
VERSION=${GITHUB_REF#refs/tags/v}
60+
fi
61+
if [ "${{ github.event_name }}" = "schedule" ]; then
62+
VERSION=nightly
63+
fi
64+
if [[ ${GITHUB_REF##*/} == "develop" ]]; then
65+
VERSION=develop
66+
fi
67+
TAGS="${VERSION}"
68+
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
69+
TAGS="$TAGS,latest"
70+
fi
71+
echo ::set-output name=version::${VERSION}
72+
echo ::set-output name=tags::${TAGS}
73+
echo ::set-output name=branch::${GITHUB_REF##*/}
74+
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
75+
echo ::set-output name=vcs_ref::${GITHUB_SHA::8}
76+
- uses: ./.github/actions/docker-target-image-list-action
77+
name: Generate Target Images
78+
id: gen-tags
79+
with:
80+
images: ${{ env.IMAGES }}
81+
tags: ${{ steps.prep.outputs.tags }}
82+
- name: Set up QEMU
83+
uses: docker/setup-qemu-action@v1
84+
with:
85+
platforms: ${{ env.PLATFORMS }}
86+
- name: Set up Docker Buildx
87+
uses: docker/setup-buildx-action@v1
88+
with:
89+
install: true
90+
version: latest
91+
driver-opts: image=moby/buildkit:master
92+
- name: Docker Multi Login
93+
uses: ./.github/actions/docker-multi-login-action
94+
env:
95+
secrets: ${{ toJSON(secrets) }}
96+
- name: Build and Push
97+
uses: docker/build-push-action@v2
98+
with:
99+
context: .
100+
file: ./Dockerfile
101+
platforms: ${{ env.PLATFORMS }}
102+
pull: true
103+
push: ${{ github.event_name != 'pull_request' }}
104+
tags: ${{ steps.gen-tags.outputs.fully-qualified-target-images }}
105+
build-args: |
106+
VERSION=${{ steps.prep.outputs.version }}
107+
BRANCH=${{ steps.prep.outputs.branch }}
108+
BUILD_DATE=${{ steps.prep.outputs.build_date }}
109+
VCS_REF=${{ steps.prep.outputs.vcs_ref }}
110+
- name: Inspect
111+
if: ${{ github.event_name != 'pull_request' }}
112+
run: |
113+
IFS=',' read -r -a images <<< "${{ steps.gen-tags.outputs.fully-qualified-target-images }}"
114+
for image in "${images[@]}"; do
115+
docker buildx imagetools inspect ${image}
116+
done
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Invalid Template'
2+
3+
on:
4+
issues:
5+
types: [labeled, unlabeled, reopened]
6+
7+
jobs:
8+
support:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: dessant/support-requests@v2
12+
with:
13+
github-token: ${{ github.token }}
14+
support-label: 'invalid:template-incomplete'
15+
issue-comment: >
16+
:wave: @{issue-author}, please edit your issue and follow the template provided.
17+
close-issue: false
18+
lock-issue: false
19+
issue-lock-reason: 'resolved'

.github/workflows/support.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Support Request'
2+
3+
on:
4+
issues:
5+
types: [labeled, unlabeled, reopened]
6+
7+
jobs:
8+
support:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: dessant/support-requests@v2
12+
with:
13+
github-token: ${{ github.token }}
14+
support-label: 'support'
15+
issue-comment: >
16+
:wave: @{issue-author}, we use the issue tracker exclusively
17+
for bug reports and feature requests. However, this issue appears
18+
to be a support request. Please use our support channels
19+
to get help with Varken!
20+
21+
- [Discord](https://discord.gg/VjZ6qSM)
22+
- [Discord Quick Access](http://cyborg.decreator.dev/channels/518970285773422592/530424560504537105/)
23+
close-issue: true
24+
lock-issue: false
25+
issue-lock-reason: 'off-topic'

.gitlab-ci.yml

Lines changed: 0 additions & 129 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
**Merged pull requests:**
77

8-
- v1.7.6 Merge [\#163](https://github.com/Boerderij/Varken/pull/163) ([samwiseg0](https://github.com/samwiseg0))
8+
- v1.7.6 Merge [\#165](https://github.com/Boerderij/Varken/pull/165) ([samwiseg0](https://github.com/samwiseg0))
99

1010
**Fixed bugs:**
1111

0 commit comments

Comments
 (0)