Skip to content

Commit

Permalink
Merge pull request #115 from dokku/master
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
josegonzalez committed Aug 6, 2023
2 parents e0773f4 + 3dcdbe1 commit 03cd775
Show file tree
Hide file tree
Showing 18 changed files with 1,113 additions and 912 deletions.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug Report
description: File a bug report
labels: ["needs: investigation", "type: bug"]
body:
- type: markdown
attributes:
value: |
Consider [sponsoring Dokku](https://github.com/sponsors/dokku). Sponsorship goes directly to supporting activities such as fixing bugs and general maintenance.
- type: textarea
id: description
attributes:
label: Description of problem
description: What happened? What did you expect to happen?
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: What are the steps that we need to follow to reproduce this issue?
validations:
required: true
- type: textarea
id: report-output
attributes:
label: docker-image-labeler version
description: Please paste the output of the command `docker-image-labeler version`
validations:
required: true
- type: textarea
id: logs
attributes:
label: "Output of failing command"
render: shell
validations:
required: false
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature Request
description: Have an idea for a new feature? Ask away!
labels: ["needs: plan", "type: enhancement"]
body:
- type: markdown
attributes:
value: |
While pull requests are always welcome, feel free to fill this out with an idea of what you would like to happen and we can discuss if and how it should be implemented in `docker-image-labeler`.
Consider [sponsoring Dokku](https://github.com/sponsors/dokku). Sponsorship goes directly to supporting activities such as implementing new features and upgrading existing functionality.
- type: textarea
id: description
attributes:
label: Description of feature
description: When you perform what command or action, what do you think should happen?
validations:
required: true
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
6 changes: 6 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
default: true

# Line length
# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013
MD013: false
5 changes: 5 additions & 0 deletions .github/linters/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
extends: default

rules:
line-length: disable
43 changes: 22 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: CI

# yamllint disable-line rule:truthy
on:
pull_request:
branches:
Expand All @@ -21,24 +22,24 @@ jobs:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

steps:
- uses: actions/checkout@v2
- name: make version
run: |
make version .env.docker
- run: make ci-report
- run: make build-docker-image
- run: make build-in-docker
- run: make validate-in-docker
- name: upload packages
uses: actions/upload-artifact@v2
with:
name: build
path: build/**/*
- name: make release-in-docker
run: |
if [[ "${GITHUB_REF#refs/heads/}" == "release" ]]; then
export CI_BRANCH=${GITHUB_REF#refs/heads/}
export PACKAGECLOUD_REPOSITORY=dokku/dokku
rm .env.docker
make .env.docker release-in-docker release-packagecloud-in-docker
fi
- uses: actions/checkout@v3
- name: make version
run: |
make version .env.docker
- run: make ci-report
- run: make build-docker-image
- run: make build-in-docker
- run: make validate-in-docker
- name: upload packages
uses: actions/upload-artifact@v3
with:
name: build
path: build/**/*
- name: make release-in-docker
run: |
if [[ "${GITHUB_REF#refs/heads/}" == "release" ]]; then
export CI_BRANCH=${GITHUB_REF#refs/heads/}
export PACKAGECLOUD_REPOSITORY=dokku/dokku
rm .env.docker
make .env.docker release-in-docker release-packagecloud-in-docker
fi
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: CI

# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- '*'
push:
branches:
- 'master'
- 'release'

jobs:
build:
name: build
runs-on: ubuntu-20.04
strategy:
fail-fast: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

steps:
- uses: actions/checkout@v3
- name: make version
run: |
make version .env.docker
- run: make ci-report
- run: make build-docker-image
- run: make build-in-docker
- run: make validate-in-docker
- name: upload packages
uses: actions/upload-artifact@v3
with:
name: build
path: build/**/*
- name: make release-in-docker
run: |
if [[ "${GITHUB_REF#refs/heads/}" == "release" ]]; then
export CI_BRANCH=${GITHUB_REF#refs/heads/}
export PACKAGECLOUD_REPOSITORY=dokku/dokku
rm .env.docker
make .env.docker release-in-docker release-packagecloud-in-docker
fi
62 changes: 16 additions & 46 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
---
name: "CodeQL"

# yamllint disable-line rule:truthy
on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '28 1 * * 0'
- cron: '31 22 * * 5'

jobs:
analyze:
Expand All @@ -32,39 +22,19 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
language: ['go']

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
74 changes: 74 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: 'lint'

# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- '*'
push:
branches:
- 'master'

jobs:
hadolint:
name: hadolint
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v3
- name: Run hadolint
uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf
# v1.5.0 => c27bd9edc1e95eed30474db8f295ff5807ebca14

markdown-lint:
name: markdown-lint
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v3
- name: Run markdown-lint
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb
# v1.5.0 => 04d43ee9191307b50935a753da3b775ab695eceb
with:
config: '.github/linters/.markdown-lint.yml'
args: './README.md'

shellcheck:
name: shellcheck
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v3
- name: Run shellcheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
env:
SHELLCHECK_OPTS: -s bash
shfmt:
name: shfmt
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v3
- name: Run shfmt
uses: luizm/action-sh-checker@76ab0b22e1f194e4a582edc7969df6485c4e9246
# v0.3.0 => 7f44869033b40ee4ffe7dc76c87a1bc66e3d025a
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
SHFMT_OPTS: -l -d -i 2
with:
sh_checker_shellcheck_disable: true
sh_checker_comment: true

yamllint:
name: yamllint
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v3
- name: Run yamllint
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c
# v3.0.2 => c19bd0523a9011c3a3960fe6640a0882b59af15d
with:
config_file: '.github/linters/.yamllint.yml'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ validation/*

# .env files
.env*

docker-image-labeler
9 changes: 5 additions & 4 deletions Dockerfile.build → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM golang:1.18.1-buster
FROM golang:1.20.5-buster

# hadolint ignore=DL3027
RUN apt-get update \
&& apt install apt-transport-https build-essential curl gnupg2 jq lintian rpm rsync rubygems-integration ruby-dev ruby -qy \
&& apt install apt-transport-https build-essential curl gnupg2 jq lintian rsync rubygems-integration ruby-dev ruby -qy \
&& git clone https://github.com/bats-core/bats-core.git /tmp/bats-core \
&& cd /tmp/bats-core \
&& ./install.sh /usr/local \
&& /tmp/bats-core/install.sh /usr/local \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# hadolint ignore=DL3028
RUN gem install --no-ri --no-rdoc --quiet rake fpm package_cloud

WORKDIR /src
Loading

0 comments on commit 03cd775

Please sign in to comment.