Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Apr 8, 2021
2 parents 420b50d + 3a99869 commit 51aac69
Show file tree
Hide file tree
Showing 16 changed files with 563 additions and 69 deletions.
51 changes: 51 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🖊️ Refactors'
labels:
- 'refactor'
- title: '👗 Style'
labels:
- 'style'
- title: '📝 Documentation'
labels:
- 'docs'
- 'documentation'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-resolver:
major:
labels:
# - 'major'
- 'breaking'
minor:
labels:
# - 'minor'
- 'feature'
- 'enhancement'
- 'refactor'
patch:
labels:
# - 'patch'
- 'fix'
- 'bugfix'
- 'bug'
- 'style'
- 'docs'
- 'documentation'
default: patch
sort-by: title
template: |
## Changes
$CHANGES
111 changes: 82 additions & 29 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ on:
- master

jobs:
build-v1-21-0-beta-0-alpine-3-8:
build-v1-21-0-alpine-3-8:
runs-on: ubuntu-18.04
env:
VARIANT_TAG: v1.21.0-beta.0-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-beta.0-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-beta.0-alpine-3.8
VARIANT_TAG: v1.21.0-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-alpine-3.8
steps:
- uses: actions/checkout@v1
- name: Display system info (linux)
Expand Down Expand Up @@ -60,12 +60,12 @@ jobs:
- name: Clean-up
run: docker logout
if: always()
build-v1-21-0-beta-0-envsubst-alpine-3-8:
build-v1-21-0-envsubst-alpine-3-8:
runs-on: ubuntu-18.04
env:
VARIANT_TAG: v1.21.0-beta.0-envsubst-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-beta.0-envsubst-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-beta.0-envsubst-alpine-3.8
VARIANT_TAG: v1.21.0-envsubst-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-envsubst-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-envsubst-alpine-3.8
steps:
- uses: actions/checkout@v1
- name: Display system info (linux)
Expand Down Expand Up @@ -111,12 +111,12 @@ jobs:
- name: Clean-up
run: docker logout
if: always()
build-v1-21-0-beta-0-git-alpine-3-8:
build-v1-21-0-git-alpine-3-8:
runs-on: ubuntu-18.04
env:
VARIANT_TAG: v1.21.0-beta.0-git-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-beta.0-git-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-beta.0-git-alpine-3.8
VARIANT_TAG: v1.21.0-git-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-git-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-git-alpine-3.8
steps:
- uses: actions/checkout@v1
- name: Display system info (linux)
Expand Down Expand Up @@ -162,12 +162,12 @@ jobs:
- name: Clean-up
run: docker logout
if: always()
build-v1-21-0-beta-0-jq-alpine-3-8:
build-v1-21-0-jq-alpine-3-8:
runs-on: ubuntu-18.04
env:
VARIANT_TAG: v1.21.0-beta.0-jq-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-beta.0-jq-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-beta.0-jq-alpine-3.8
VARIANT_TAG: v1.21.0-jq-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-jq-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-jq-alpine-3.8
steps:
- uses: actions/checkout@v1
- name: Display system info (linux)
Expand Down Expand Up @@ -213,12 +213,12 @@ jobs:
- name: Clean-up
run: docker logout
if: always()
build-v1-21-0-beta-0-kustomize-alpine-3-8:
build-v1-21-0-kustomize-alpine-3-8:
runs-on: ubuntu-18.04
env:
VARIANT_TAG: v1.21.0-beta.0-kustomize-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-beta.0-kustomize-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-beta.0-kustomize-alpine-3.8
VARIANT_TAG: v1.21.0-kustomize-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-kustomize-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-kustomize-alpine-3.8
steps:
- uses: actions/checkout@v1
- name: Display system info (linux)
Expand Down Expand Up @@ -264,12 +264,12 @@ jobs:
- name: Clean-up
run: docker logout
if: always()
build-v1-21-0-beta-0-ssh-alpine-3-8:
build-v1-21-0-ssh-alpine-3-8:
runs-on: ubuntu-18.04
env:
VARIANT_TAG: v1.21.0-beta.0-ssh-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-beta.0-ssh-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-beta.0-ssh-alpine-3.8
VARIANT_TAG: v1.21.0-ssh-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-ssh-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-ssh-alpine-3.8
steps:
- uses: actions/checkout@v1
- name: Display system info (linux)
Expand Down Expand Up @@ -315,12 +315,12 @@ jobs:
- name: Clean-up
run: docker logout
if: always()
build-v1-21-0-beta-0-envsubst-git-jq-kustomize-ssh-alpine-3-8:
build-v1-21-0-envsubst-git-jq-kustomize-ssh-alpine-3-8:
runs-on: ubuntu-18.04
env:
VARIANT_TAG: v1.21.0-beta.0-envsubst-git-jq-kustomize-ssh-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-beta.0-envsubst-git-jq-kustomize-ssh-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-beta.0-envsubst-git-jq-kustomize-ssh-alpine-3.8
VARIANT_TAG: v1.21.0-envsubst-git-jq-kustomize-ssh-alpine-3.8
# VARIANT_TAG_WITH_REF: v1.21.0-envsubst-git-jq-kustomize-ssh-alpine-3.8-${GITHUB_REF}
VARIANT_BUILD_DIR: variants/v1.21.0-envsubst-git-jq-kustomize-ssh-alpine-3.8
steps:
- uses: actions/checkout@v1
- name: Display system info (linux)
Expand Down Expand Up @@ -2864,4 +2864,57 @@ jobs:
docker push "${DOCKERHUB_REGISTRY_USER}/${CI_PROJECT_NAME}:${VARIANT_TAG_WITH_REF_AND_SHA_SHORT}"
- name: Clean-up
run: docker logout
if: always()
if: always()
resolve-release-tag:
runs-on: ubuntu-latest
outputs:
TAG: ${{ steps.resolve-release-tag.outputs.TAG }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Resolve release tag
id: resolve-release-tag
run: |
set +e
# E.g. 20210402
TODAYS_DATE=$( date -u '+%Y%m%d' )
# Is this the first tag for this date?
TODAYS_DATE_TAGS=$( git tag --list | grep "^$TODAYS_DATE" )
TAG=
if [ -z "$TODAYS_DATE_TAGS" ]; then
# E.g. 20210402.0.0
TAG="$TODAYS_DATE.0.0" # Send this to stdout
else
# E.g. if there are 20210402.0.0, 20210402.0.1, 20210402.0.2, this returns 2
VERSION_MINOR_LATEST=$( echo "$TODAYS_DATE_TAGS" | cut -d '.' -f 3 | sort -nr | head -n1 )
# Minor version
VERSION_MINOR=$( expr "$VERSION_MINOR_LATEST" + 1 )
# E.g. 20210402.0.3
TAG="$TODAYS_DATE.0.$VERSION_MINOR" # Send this to stdout
fi
echo "TODAYS_DATE: $TODAYS_DATE"
echo "TODAYS_DATE_TAGS: $TODAYS_DATE_TAGS"
echo "TAG: $TAG"
echo "::set-output name=TAG::$TAG"
- name: Print outputs
run: echo ${{ steps.resolve-release-tag.outputs.TAG }}
update-draft-release:
needs: [build-v1-21-0-alpine-3-8, build-v1-21-0-envsubst-alpine-3-8, build-v1-21-0-git-alpine-3-8, build-v1-21-0-jq-alpine-3-8, build-v1-21-0-kustomize-alpine-3-8, build-v1-21-0-ssh-alpine-3-8, build-v1-21-0-envsubst-git-jq-kustomize-ssh-alpine-3-8, build-v1-20-4-alpine-3-8, build-v1-20-4-envsubst-alpine-3-8, build-v1-20-4-git-alpine-3-8, build-v1-20-4-jq-alpine-3-8, build-v1-20-4-kustomize-alpine-3-8, build-v1-20-4-ssh-alpine-3-8, build-v1-20-4-envsubst-git-jq-kustomize-ssh-alpine-3-8, build-v1-19-7-alpine-3-8, build-v1-19-7-envsubst-alpine-3-8, build-v1-19-7-git-alpine-3-8, build-v1-19-7-jq-alpine-3-8, build-v1-19-7-kustomize-alpine-3-8, build-v1-19-7-ssh-alpine-3-8, build-v1-19-7-envsubst-git-jq-kustomize-ssh-alpine-3-8, build-v1-18-15-alpine-3-8, build-v1-18-15-envsubst-alpine-3-8, build-v1-18-15-git-alpine-3-8, build-v1-18-15-jq-alpine-3-8, build-v1-18-15-kustomize-alpine-3-8, build-v1-18-15-ssh-alpine-3-8, build-v1-18-15-envsubst-git-jq-kustomize-ssh-alpine-3-8, build-v1-17-17-alpine-3-8, build-v1-17-17-envsubst-alpine-3-8, build-v1-17-17-git-alpine-3-8, build-v1-17-17-jq-alpine-3-8, build-v1-17-17-kustomize-alpine-3-8, build-v1-17-17-ssh-alpine-3-8, build-v1-17-17-envsubst-git-jq-kustomize-ssh-alpine-3-8, build-v1-16-15-alpine-3-8, build-v1-16-15-envsubst-alpine-3-8, build-v1-16-15-git-alpine-3-8, build-v1-16-15-jq-alpine-3-8, build-v1-16-15-kustomize-alpine-3-8, build-v1-16-15-ssh-alpine-3-8, build-v1-16-15-envsubst-git-jq-kustomize-ssh-alpine-3-8, build-v1-15-12-alpine-3-8, build-v1-15-12-envsubst-alpine-3-8, build-v1-15-12-git-alpine-3-8, build-v1-15-12-jq-alpine-3-8, build-v1-15-12-kustomize-alpine-3-8, build-v1-15-12-ssh-alpine-3-8, build-v1-15-12-envsubst-git-jq-kustomize-ssh-alpine-3-8, build-v1-14-10-alpine-3-8, build-v1-14-10-envsubst-alpine-3-8, build-v1-14-10-git-alpine-3-8, build-v1-14-10-jq-alpine-3-8, build-v1-14-10-kustomize-alpine-3-8, build-v1-14-10-ssh-alpine-3-8, build-v1-14-10-envsubst-git-jq-kustomize-ssh-alpine-3-8, resolve-release-tag]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Print inputs
run: echo ${{ needs.resolve-release-tag.outputs.TAG }}
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
publish: false
name: ${{ needs.resolve-release-tag.outputs.TAG }}
tag: ${{ needs.resolve-release-tag.outputs.TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 51aac69

Please sign in to comment.