.gitea/workflows/linux_arm64_docker-release.yaml aktualisiert
All checks were successful
Build Docker Linux ARM64 Release / build-docker-linux-arm64-release (push) Successful in 1m12s
All checks were successful
Build Docker Linux ARM64 Release / build-docker-linux-arm64-release (push) Successful in 1m12s
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
name: Build Docker Linux ARM64 Release
|
name: Build Docker Linux ARM64 Release
|
||||||
run-name: Release-Docker-Linux-ARM64
|
run-name: Release-Docker-Linux-ARM64
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main", "master" ]
|
||||||
|
tags: [ "v*" ] # Reagiert auf v1.0, v2.1.3, etc.
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-docker-linux-arm64-release:
|
build-docker-linux-arm64-release:
|
||||||
@@ -12,10 +15,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Clone the repository
|
- name: Clone the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Wichtig für Versionierung
|
||||||
|
|
||||||
- name: Lowercase Repo Name
|
# Version bestimmen
|
||||||
|
- name: Get Version
|
||||||
|
id: get_version
|
||||||
run: |
|
run: |
|
||||||
echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
|
# Wenn ein Tag vorhanden ist (z.B. v1.0.2), nimm diesen.
|
||||||
|
# Sonst generiere eine Version aus dem Datum + Kurz-Hash.
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
|
else
|
||||||
|
VERSION="latest-$(date +%Y%m%d)-$(git rev-parse --short HEAD)"
|
||||||
|
fi
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Login to own image registry
|
- name: Login to own image registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@@ -24,9 +39,6 @@ jobs:
|
|||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Setup .NET10
|
- name: Setup .NET10
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
@@ -34,29 +46,29 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Linux ARM64 Docker Image
|
- name: Build Linux ARM64 Docker Image
|
||||||
run: |
|
run: |
|
||||||
|
# Wir bauen das Image mit ZWEI Tags:
|
||||||
|
# 1. Der spezifischen Version (z.B. v1.0.2)
|
||||||
|
# 2. Dem 'latest' Tag (damit das aktuellste Image immer 'latest' ist)
|
||||||
docker build \
|
docker build \
|
||||||
|
-t gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }} \
|
||||||
-t gitea.penry.de/${{ env.REPO_LC }}:latest \
|
-t gitea.penry.de/${{ env.REPO_LC }}:latest \
|
||||||
--label "org.opencontainers.image.source=https://gitea.penry.de/${{ github.repository }}" \
|
--label "org.opencontainers.image.source=https://gitea.penry.de/${{ github.repository }}" \
|
||||||
.
|
.
|
||||||
|
|
||||||
#- name: Build and Push Image
|
- name: Push Images
|
||||||
# uses: docker/build-push-action@v6
|
run: |
|
||||||
# with:
|
docker push gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }}
|
||||||
# context: .
|
docker push gitea.penry.de/${{ env.REPO_LC }}:latest
|
||||||
# platforms: linux/arm64
|
|
||||||
# push: true
|
|
||||||
# tags: gitea.penry.de/couchlog/linux-arm64:latest
|
|
||||||
# load: true
|
|
||||||
|
|
||||||
- name: Push
|
|
||||||
run: docker push gitea.penry.de/${{ env.REPO_LC }}:latest
|
|
||||||
|
|
||||||
- name: Make Tar from image
|
- name: Make Tar from image
|
||||||
run: |
|
run: |
|
||||||
docker save -o couchlog-linux-arm64.tar gitea.penry.de/${{ env.REPO_LC }}:latest
|
# Wir nutzen die Version auch im Dateinamen vom Tar
|
||||||
|
docker save -o couchlog-linux-arm64-${{ env.VERSION }}.tar gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }}
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
|
# Das Release wird nur erstellt, wenn es wirklich ein Tag-Push ist
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
files: |-
|
files: |-
|
||||||
couchlog-linux-arm64.tar
|
couchlog-linux-arm64-${{ env.VERSION }}.tar
|
||||||
Reference in New Issue
Block a user