Files
Gitea/.gitea/workflows/release.yml
T
Cantibra 32408c0b7a
Gitea / Gitea (arm64, cicd.any, bookworm trixie noble, main) (push) Successful in 3m26s
Gitea / Gitea (amd64, cicd.any, bookworm trixie noble, main) (push) Successful in 3m42s
Initialize Git Repository: 'Gitea'
2026-05-12 06:30:01 +02:00

92 lines
4.9 KiB
YAML

name: Gitea
on:
push:
branches:
- release
jobs:
workflow:
name: Gitea
strategy:
matrix:
include:
- architecture: amd64
cicd: cicd.any
codename: bookworm trixie noble
component: main
- architecture: arm64
cicd: cicd.any
codename: bookworm trixie noble
component: main
runs-on: ${{ matrix.cicd }}
steps:
- name: Repository (Workspace) [Checkout]
uses: actions/checkout@v6
- name: Environment [Source]
id: environment
run: |
source './.env'
/usr/bin/echo "VERSION=${VERSION}" >> "${GITHUB_OUTPUT}"
/usr/bin/echo "Set Variable 'VERSION' to '${VERSION}'"
- name: Gitea [Action Cache Hit]
uses: actions/cache/restore@v5
id: cache-gitea
with:
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
lookup-only: true
path: |
./sources
- name: Gitea [Action Cache Restore]
if: steps.cache-gitea.outputs.cache-hit == 'true'
uses: actions/cache/restore@v5
with:
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
path: |
./sources
- name: Gitea [Download]
if: steps.cache-gitea.outputs.cache-hit != 'true'
run: |
/usr/bin/install --directory --verbose './sources'
/usr/bin/wget --verbose --output-document='./sources/gitea' 'https://dl.gitea.com/gitea/${{ steps.environment.outputs.version }}/gitea-${{ steps.environment.outputs.version }}-linux-${{ matrix.architecture }}'
- name: Gitea [Action Cache Save]
if: steps.cache-gitea.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
path: |
./sources
- name: Gitea [Prepare Debian Package]
run: |
/usr/bin/sed --in-place --expression='s/Architecture:.*/Architecture: ${{ matrix.architecture }}/' './gitea/DEBIAN/control'
/usr/bin/sed --in-place --expression='s/Version:.*/Version: ${{ steps.environment.outputs.version }}/' './gitea/DEBIAN/control'
/usr/bin/chmod --verbose '0755' './gitea/DEBIAN/postinst'
/usr/bin/chmod --verbose '0755' './gitea/DEBIAN/postrm'
/usr/bin/chmod --verbose '0755' './gitea/DEBIAN/preinst'
/usr/bin/chmod --verbose '0755' './gitea/DEBIAN/prerm'
/usr/bin/chmod --verbose '0755' './gitea/etc/init.d/gitea'
/usr/bin/install --directory --verbose './gitea/usr/sbin'
/usr/bin/mv --verbose './sources/gitea' './gitea/usr/sbin/gitea'
/usr/bin/chmod --verbose '0755' './gitea/usr/sbin/gitea'
- name: Debian Package [Generate]
run: |
/usr/bin/dpkg-gen './gitea'
/usr/bin/mv --verbose './gitea.deb' './gitea_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.deb'
- name: Release Debian Package [Configuration]
run: |
/usr/bin/echo '${{ secrets.REPOSITORY_SSH_PRIVATE_KEY }}' > './id_ed25519'
/usr/bin/chmod --quiet '0400' './id_ed25519'
/usr/bin/echo "REPOSITORY_CODENAME='${{ matrix.codename }}'" > './gitea_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg'
/usr/bin/echo "Set Configuration 'REPOSITORY_CODENAME' to '${{ matrix.codename }}'"
/usr/bin/echo "REPOSITORY_COMPONENT='${{ matrix.component }}'" >> './gitea_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg'
/usr/bin/echo "Set Configuration 'REPOSITORY_COMPONENT' to '${{ matrix.component }}'"
- name: Release Debian Package [PrivLab Repository]
uses: https://gitea.com/actions/gitea-release-action@v1
with:
name: Gitea v${{ steps.environment.outputs.version }}
tag_name: v${{ steps.environment.outputs.version }}
files: |
gitea_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.deb
- name: Release Debian Package [Advanced Package Tool Repository]
run: |
/usr/bin/scp -4 -B -C -i './id_ed25519' -o 'LogLevel QUIET' -o 'StrictHostKeyChecking no' -o "UserKnownHostsFile '/dev/null'" './gitea_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.deb' '${{ secrets.REPOSITORY_SSH_USER }}'@'${{ secrets.REPOSITORY_SSH_HOSTNAME }}':'${{ secrets.REPOSITORY_DESTINATION }}/gitea_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.deb'
/usr/bin/scp -4 -B -C -i './id_ed25519' -o 'LogLevel QUIET' -o 'StrictHostKeyChecking no' -o "UserKnownHostsFile '/dev/null'" './gitea_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg' '${{ secrets.REPOSITORY_SSH_USER }}'@'${{ secrets.REPOSITORY_SSH_HOSTNAME }}':'${{ secrets.REPOSITORY_DESTINATION }}/gitea_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg'