WIP potentially to be dropped
This commit is contained in:
parent
10cce1376a
commit
880c0d5ec9
14 changed files with 208 additions and 77 deletions
73
.github/workflows/build.yaml
vendored
Normal file
73
.github/workflows/build.yaml
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Load versions from .env.versions
|
||||
id: versions
|
||||
run: |
|
||||
set -a
|
||||
source .env.versions
|
||||
set +a
|
||||
|
||||
echo "node_version=${NODE_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "go_version=${GO_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "hugo_version=${HUGO_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "Node: ${NODE_VERSION}"
|
||||
echo "Go: ${GO_VERSION}"
|
||||
echo "Hugo: ${HUGO_VERSION}"
|
||||
|
||||
- name: Repository meta
|
||||
id: repository
|
||||
run: |
|
||||
registry=${{ github.server_url }}
|
||||
registry=${registry##http*://}
|
||||
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
||||
echo "registry=${registry}"
|
||||
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
||||
echo "repository=${repository}"
|
||||
|
||||
- name: Docker meta
|
||||
uses: docker/metadata-action@v5
|
||||
id: docker
|
||||
with:
|
||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||
tags: |
|
||||
type=sha,prefix=
|
||||
type=ref,event=tag
|
||||
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
buildkitd-flags: '--allow-insecure-entitlement network.host'
|
||||
driver-opts: network=host
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
allow: network.host
|
||||
network: host
|
||||
tags: ${{ steps.docker.outputs.tags }}
|
||||
labels: ${{ steps.docker.outputs.labels }}
|
||||
build-args: |
|
||||
NODE_VERSION=${{ steps.versions.outputs.node_version }}
|
||||
GO_VERSION=${{ steps.versions.outputs.go_version }}
|
||||
HUGO_VERSION=${{ steps.versions.outputs.hugo_version }}
|
||||
|
||||
5
.github/workflows/ci.yaml
vendored
5
.github/workflows/ci.yaml
vendored
|
|
@ -2,7 +2,6 @@ name: ci
|
|||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -22,11 +21,11 @@ jobs:
|
|||
set -a
|
||||
source .env.versions
|
||||
set +a
|
||||
|
||||
|
||||
echo "node_version=${NODE_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "go_version=${GO_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "hugo_version=${HUGO_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
||||
echo "Node: ${NODE_VERSION}"
|
||||
echo "Go: ${GO_VERSION}"
|
||||
echo "Hugo: ${HUGO_VERSION}"
|
||||
|
|
|
|||
22
.github/workflows/release.yaml
vendored
22
.github/workflows/release.yaml
vendored
|
|
@ -26,11 +26,11 @@ jobs:
|
|||
set -a
|
||||
source .env.versions
|
||||
set +a
|
||||
|
||||
|
||||
echo "node_version=${NODE_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "go_version=${GO_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "hugo_version=${HUGO_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
||||
echo "Node: ${NODE_VERSION}"
|
||||
echo "Go: ${GO_VERSION}"
|
||||
echo "Hugo: ${HUGO_VERSION}"
|
||||
|
|
@ -100,7 +100,7 @@ jobs:
|
|||
run: |
|
||||
# Finde vorheriges Tag
|
||||
PREVIOUS_TAG=$(git describe --abbrev=0 --tags ${GITHUB_REF}^ 2>/dev/null || echo "")
|
||||
|
||||
|
||||
if [ -z "$PREVIOUS_TAG" ]; then
|
||||
echo "Erster Release - Changelog von Anfang an"
|
||||
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges)
|
||||
|
|
@ -108,7 +108,7 @@ jobs:
|
|||
echo "Changelog seit ${PREVIOUS_TAG}"
|
||||
CHANGELOG=$(git log ${PREVIOUS_TAG}..${GITHUB_REF} --pretty=format:"- %s (%h)" --no-merges)
|
||||
fi
|
||||
|
||||
|
||||
# Schreibe in Output-Datei (multiline)
|
||||
{
|
||||
echo 'changelog<<EOF'
|
||||
|
|
@ -128,22 +128,22 @@ jobs:
|
|||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release-notes: |
|
||||
# Release ${{ steps.version.outputs.version }}
|
||||
|
||||
|
||||
## Docker Images
|
||||
|
||||
|
||||
Multi-platform images (linux/amd64, linux/arm64) sind verfügbar:
|
||||
|
||||
|
||||
```bash
|
||||
docker pull ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}:${{ steps.version.outputs.version }}
|
||||
docker pull ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}:latest
|
||||
```
|
||||
|
||||
|
||||
## Build Versions
|
||||
|
||||
|
||||
- Node.js: ${{ steps.versions.outputs.node_version }}
|
||||
- Go: ${{ steps.versions.outputs.go_version }}
|
||||
- Hugo: ${{ steps.versions.outputs.hugo_version }}
|
||||
|
||||
|
||||
## Changes
|
||||
|
||||
|
||||
${{ steps.changelog.outputs.changelog }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue