Skip to content

Commit

Permalink
v1.7.7
Browse files Browse the repository at this point in the history
Merge pull request #191 from Boerderij/develop
  • Loading branch information
dirtycajunrice committed Dec 21, 2020
2 parents b3b1876 + 50eb83a commit 23bcbbf
Show file tree
Hide file tree
Showing 21 changed files with 270 additions and 206 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: awaiting-approval
labels: awaiting-triage
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: "[Feature Request]"
labels: awaiting-approval
labels: awaiting-triage
assignees: ''

---
Expand Down
23 changes: 23 additions & 0 deletions .github/actions/docker-multi-login-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Docker Multi Login Action'
description: 'Log in to dockerhub, quay, and github container registry'
runs:
using: "composite"
steps:
- shell: bash
run: |
echo "🔑 Logging into dockerhub..."
if docker login --username ${{ fromJSON(env.secrets).DOCKERHUB_USERNAME }} --password ${{ fromJSON(env.secrets).DOCKERHUB_PASSWORD }} > /dev/null 2>&1; then
echo "🎉 Login Succeeded!"
fi
- shell: bash
run: |
echo "🔑 Logging into quay.io..."
if docker login quay.io --username ${{ fromJSON(env.secrets).QUAY_USERNAME }} --password ${{ fromJSON(env.secrets).QUAY_PASSWORD }} > /dev/null 2>&1; then
echo "🎉 Login Succeeded!"
fi
- shell: bash
run: |
echo "🔑 Logging into ghcr.io..."
if docker login ghcr.io --username ${{ fromJSON(env.secrets).GHCR_USERNAME }} --password ${{ fromJSON(env.secrets).GHCR_PASSWORD }} > /dev/null 2>&1; then
echo "🎉 Login Succeeded!"
fi
46 changes: 46 additions & 0 deletions .github/actions/docker-target-image-list-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Docker Target Image List Generator'
description: 'A Github Action to generate a list of fully qualified target images for docker related steps'
inputs:
registries:
description: "Comma separated list of docker registries"
required: false
default: "docker.io,quay.io,ghcr.io"
images:
description: "Comma separated list of images"
required: true
tags:
description: "Comma separated list of image tags"
required: false
default: "edge"
outputs:
fully-qualified-target-images:
description: "List of fully qualified docker target images"
value: ${{ steps.gen-fqti.outputs.fully-qualified-target-images }}
runs:
using: "composite"
steps:
- name: Generate fully qualified docker target images
id: gen-fqti
shell: bash
run: |
IFS=',' read -r -a registries <<< "${{ inputs.registries }}"
IFS=',' read -r -a images <<< "${{ inputs.images }}"
IFS=',' read -r -a tags <<< "${{ inputs.tags }}"
FQTI=""
echo "Generating fully qualified docker target images for:"
echo "🐋 Registries: ${#registries[@]}"
echo "📷 Images: ${#images[@]}"
echo "🏷️ Tags: ${#tags[@]}"
echo "🧮 Total: $((${#registries[@]}*${#images[@]}*${#tags[@]}))"
for registry in "${registries[@]}"; do
for image in "${images[@]}"; do
for tag in "${tags[@]}"; do
if [ -z "$FQTI" ]; then
FQTI="${registry}/${image}:${tag}"
else
FQTI="$FQTI,${registry}/${image}:${tag}"
fi
done
done
done
echo ::set-output name=fully-qualified-target-images::${FQTI}
116 changes: 116 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: varken
on:
schedule:
- cron: '0 10 * * *'
push:
branches:
- master
- develop
tags:
- 'v*.*.*'
paths:
- '.github/workflows/docker.yaml'
- 'varken/**'
- 'Varken.py'
- 'Dockerfile'
pull_request:
branches:
- master
- develop
paths:
- '.github/workflows/docker.yaml'
- 'varken/**'
- 'Varken.py'
- 'Dockerfile'
workflow_dispatch:
inputs:
tag:
description: 'Use this tag instead of most recent'
required: false
ignore-existing-tag:
description: 'Ignore existing tag if "true"'
required: false
env:
IMAGES: boerderij/varken
PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7"
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Lint
run: pip install flake8 && flake8 --max-line-length 120 Varken.py varken/*.py
build:
runs-on: ubuntu-latest
needs: lint-and-test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
id: prep
run: |
VERSION=edge
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
fi
if [ "${{ github.event_name }}" = "schedule" ]; then
VERSION=nightly
fi
if [[ ${GITHUB_REF##*/} == "develop" ]]; then
VERSION=develop
fi
TAGS="${VERSION}"
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,latest"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=branch::${GITHUB_REF##*/}
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=vcs_ref::${GITHUB_SHA::8}
- uses: ./.github/actions/docker-target-image-list-action
name: Generate Target Images
id: gen-tags
with:
images: ${{ env.IMAGES }}
tags: ${{ steps.prep.outputs.tags }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: ${{ env.PLATFORMS }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
install: true
version: latest
driver-opts: image=moby/buildkit:master
- name: Docker Multi Login
uses: ./.github/actions/docker-multi-login-action
env:
secrets: ${{ toJSON(secrets) }}
- name: Build and Push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
pull: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.gen-tags.outputs.fully-qualified-target-images }}
build-args: |
VERSION=${{ steps.prep.outputs.version }}
BRANCH=${{ steps.prep.outputs.branch }}
BUILD_DATE=${{ steps.prep.outputs.build_date }}
VCS_REF=${{ steps.prep.outputs.vcs_ref }}
- name: Inspect
if: ${{ github.event_name != 'pull_request' }}
run: |
IFS=',' read -r -a images <<< "${{ steps.gen-tags.outputs.fully-qualified-target-images }}"
for image in "${images[@]}"; do
docker buildx imagetools inspect ${image}
done
19 changes: 19 additions & 0 deletions .github/workflows/invalid_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Invalid Template'

on:
issues:
types: [labeled, unlabeled, reopened]

jobs:
support:
runs-on: ubuntu-latest
steps:
- uses: dessant/support-requests@v2
with:
github-token: ${{ github.token }}
support-label: 'invalid:template-incomplete'
issue-comment: >
:wave: @{issue-author}, please edit your issue and follow the template provided.
close-issue: false
lock-issue: false
issue-lock-reason: 'resolved'
25 changes: 25 additions & 0 deletions .github/workflows/support.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Support Request'

on:
issues:
types: [labeled, unlabeled, reopened]

jobs:
support:
runs-on: ubuntu-latest
steps:
- uses: dessant/support-requests@v2
with:
github-token: ${{ github.token }}
support-label: 'support'
issue-comment: >
:wave: @{issue-author}, we use the issue tracker exclusively
for bug reports and feature requests. However, this issue appears
to be a support request. Please use our support channels
to get help with Varken!
- [Discord](https://discord.gg/VjZ6qSM)
- [Discord Quick Access](http://cyborg.decreator.dev/channels/518970285773422592/530424560504537105/)
close-issue: true
lock-issue: false
issue-lock-reason: 'off-topic'
129 changes: 0 additions & 129 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

**Merged pull requests:**

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

**Fixed bugs:**

Expand Down

0 comments on commit 23bcbbf

Please sign in to comment.