-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- exclude from release notes | ||
categories: | ||
- title: Maintenance | ||
labels: | ||
- maintenance | ||
- title: New Features | ||
labels: | ||
- new feature | ||
- title: Improvements | ||
labels: | ||
- improvement | ||
- title: Bug Fixes | ||
labels: | ||
- bug | ||
- title: Other | ||
labels: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Release new version | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
latest: | ||
description: | ||
Release as the latest version, tagging the images with the version number found in | ||
package.json. | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
tags: | ||
name: Compose version tags | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Parse semver number from package.json | ||
run: | | ||
PACKAGE_VERSION=$(cat package.json | jq '.version' | tr -d '"') | ||
echo "MAJOR=$(echo $PACKAGE_VERSION | cut -d "." -f 1)" >> $GITHUB_ENV | ||
echo "MINOR=$(echo $PACKAGE_VERSION | cut -d "." -f 2)" >> $GITHUB_ENV | ||
echo "PATCH=$(echo $PACKAGE_VERSION | cut -d "." -f 3)" >> $GITHUB_ENV | ||
echo $PACKAGE_VERSION | ||
echo $MAJOR | ||
- name: Compose semver tags | ||
run: | | ||
echo "MAJOR_V=$MAJOR" >> $GITHUB_ENV | ||
echo "MINOR_V=MAJOR.MINOR" >> $GITHUB_ENV | ||
echo "FULL_V=MAJOR.MINOR.PATCH" >> $GITHUB_ENV | ||
- name: Compose tag list | ||
run: echo "TAG_LIST=$MAJOR_V,$MINOR_V,$FULL_V,latest" >> $GITHUB_ENV | ||
- name: Select correct tags | ||
id: tags | ||
run: if [ ${{ inputs.latest }} ]; then echo $TAG_LIST; else echo "next"; fi | ||
outputs: | ||
tag-list: ${{ inputs.latest && '$TAG_LIST' || 'next' }} | ||
|
||
publish: | ||
name: Publish image | ||
needs: | ||
- tags | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Testing | ||
run: echo ${{ needs.tags.outputs.tag-list }} | ||
# - name: Login to GHCR | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# registry: ghcr.io | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Build production image | ||
# uses: docker/build-push-action@v5 | ||
# with: | ||
# context: app | ||
# tags: kaiku | ||
# - name: Tag image with version | ||
# if: ${{ inputs.latest }} | ||
# run: | | ||
# docker tag kaiku ghcr.io/funidata/kaiku:${{ steps.tags.outputs.full }} | ||
# docker tag kaiku ghcr.io/funidata/kaiku:${{ steps.tags.outputs.minor }} | ||
# docker tag kaiku ghcr.io/funidata/kaiku:${{ steps.tags.outputs.major }} | ||
# docker tag kaiku ghcr.io/funidata/kaiku:latest | ||
# - name: Tag image as experimental | ||
# if: ${{ inputs.latest }} | ||
# run: docker tag kaiku ghcr.io/funidata/kaiku:next | ||
# - name: Push image to GHCR | ||
# run: docker push --all-tags ghcr.io/funidata/kaiku |