Skip to content

Commit

Permalink
Merge pull request #1 from ForestsoftGmbH/feature/target-image
Browse files Browse the repository at this point in the history
Define target for docker build image
  • Loading branch information
Forestsoft-de authored Oct 2, 2022
2 parents 23209fb + b6d9c28 commit 6d12929
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '[0-9]+.[0-9]+.[0-9]+*' # Push events to any matching semantic tag. For example, 1.10.1 or 2.0.0 or 3.0.0-alpha.
# For more details, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
# and https://docs.npmjs.com/about-semantic-versioning

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@main
with:
configuration: 'release-changelog-builder-config.json'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{steps.build_changelog.outputs.changelog}}
draft: false
prerelease: false
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ inputs:
description: "Path to the Dockerfile"
required: true

target:
description: "Target to build"
default: ""
required: false

Username:
description: "Username for registry"
required: true
Expand All @@ -44,6 +49,7 @@ runs:
run: |
echo "::set-output name=sha_short::${{ inputs.DOCKER_TAG }}"
echo "::set-output name=DOCKER_IMAGE::${{ inputs.DOCKER_IMAGE }}"
echo "::set-output name=BUILD_ARGS::${{ inputs.build-args }}"
- name: Set up Docker Context for Buildx
shell: bash
Expand Down Expand Up @@ -92,6 +98,7 @@ runs:
file: ${{ inputs.file }}
push: true
pull: true
target: "${{inputs.target}}"
build-args: |
${{ steps.vars.outputs.BUILD_ARGS }}
cache-from: type=local,src=/tmp/.buildx-cache
Expand Down
33 changes: 33 additions & 0 deletions release-changelog-builder-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"categories": [
{
"title": "## 🐛 Bug Fixes",
"labels": ["bug"]
},
{
"title": "## 📃 Documentation Updates",
"labels": ["documentation"]
},
{
"title": "## ✨ Enhancements",
"labels": ["enhancement"]
}
],
"ignore_labels": ["ignore", "invalid", "wontfix"],
"sort": "ASC",
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}\n\n## Other Updates\n\n${{UNCATEGORIZED}}\n",
"pr_template": "- ${{TITLE}} (#${{NUMBER}})",
"empty_template": "No Changes",
"label_extractor": [
{
"pattern": "(.) (.+)",
"target": "$1"
}
],
"max_tags_to_fetch": 200,
"max_pull_requests": 250,
"max_back_track_time_days": 90,
"tag_resolver": {
"method": "semver"
}
}

0 comments on commit 6d12929

Please sign in to comment.