fix(ci): update Hadolint format and improve release workflow for version input
This commit is contained in:
@@ -21,7 +21,8 @@ jobs:
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
output-file: hadolint.out
|
||||
format: sonarqube
|
||||
# format: sonarqube
|
||||
format: tty
|
||||
no-fail: true
|
||||
|
||||
- name: Print Hadolint results
|
||||
|
||||
@@ -1,32 +1,31 @@
|
||||
name: Release
|
||||
name: Build and Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
schedule:
|
||||
- cron: '0 9 * * 0'
|
||||
inputs:
|
||||
version:
|
||||
description: 'Documize version to build (e.g., v5.14.0). Must start with "v" and match an existing Documize release tag.'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
# tag:
|
||||
# name: Tag release
|
||||
# uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/release-with-tag.yaml@main
|
||||
|
||||
tag:
|
||||
name: Tag release
|
||||
uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/release-with-tag.yaml@main
|
||||
# create_release:
|
||||
# name: Create Release
|
||||
# needs: tag
|
||||
# uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/create-release-preexisting-tag.yaml@main
|
||||
# with:
|
||||
# tag: ${{ needs.tag.outputs.tag_name }}
|
||||
# body: ${{ needs.tag.outputs.changelog }}
|
||||
# secrets:
|
||||
# ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
|
||||
|
||||
create_release:
|
||||
name: Create Release
|
||||
needs: tag
|
||||
uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/create-release-preexisting-tag.yaml@main
|
||||
with:
|
||||
tag: ${{ needs.tag.outputs.tag_name }}
|
||||
body: ${{ needs.tag.outputs.changelog }}
|
||||
secrets:
|
||||
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
|
||||
|
||||
create_docker:
|
||||
docker:
|
||||
name: Publish Docker Images
|
||||
runs-on: ubuntu-latest
|
||||
needs: [tag, create_release]
|
||||
# needs: [tag, create_release]
|
||||
steps:
|
||||
- name: Update Docker configuration
|
||||
continue-on-error: true
|
||||
@@ -48,7 +47,7 @@ jobs:
|
||||
uses: actions/checkout@v6.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ needs.tag.outputs.tag_name }}
|
||||
ref: main
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
@@ -71,7 +70,7 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
tags: type=semver,pattern=v{{version}},value=${{ needs.tag.outputs.tag_name }}
|
||||
tags: type=semver,pattern=v{{version}},value=${{ inputs.version }}
|
||||
images: |
|
||||
ghcr.io/${{ vars.GHCR_USERNAME }}/${{ steps.split.outputs.repo }}
|
||||
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}
|
||||
@@ -90,6 +89,8 @@ jobs:
|
||||
context: .
|
||||
push: false
|
||||
load: true
|
||||
build-args: |
|
||||
DOCUMIZE_VERSION=${{ inputs.version }}
|
||||
annotations: ${{ steps.meta.outputs.annotations }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
Reference in New Issue
Block a user