Files
Traefik/.gitea/workflows/release.yml
T
Cantibra 3d93760949
Traefik / Traefik (amd64, cicd.any, bookworm trixie noble, main) (push) Successful in 1m34s
Traefik / Traefik (arm64, cicd.any, bookworm trixie noble, main) (push) Successful in 1m16s
Initialize Git Repository: 'Traefik'
2026-05-04 21:22:05 +02:00

98 lines
5.1 KiB
YAML

name: Traefik
on:
push:
branches:
- release
jobs:
workflow:
name: Traefik
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 [Clone]
uses: actions/checkout@v6
- name: Environment
id: environment
run: |
source './.env'
/usr/bin/echo "VERSION=${VERSION}" >> "${GITHUB_OUTPUT}"
/usr/bin/echo "Set Variable 'VERSION' to '${VERSION}'"
- name: Traefik [Download]
env:
ARCHITECTURE: ${{ matrix.architecture }}
VERSION: ${{ steps.environment.outputs.version }}
run: |
/usr/bin/wget --verbose --output-document='./binaries.tar.gz' "https://github.com/traefik/traefik/releases/download/v${VERSION}/traefik_v${VERSION}_linux_${ARCHITECTURE}.tar.gz"
- name: Traefik [Extract]
run: |
/usr/bin/install --directory --verbose './binaries'
/usr/bin/tar --extract --gzip --verbose --file='./binaries.tar.gz' --directory='./binaries'
- name: Debian Package [Prepare]
env:
ARCHITECTURE: ${{ matrix.architecture }}
VERSION: ${{ steps.environment.outputs.version }}
run: |
/usr/bin/sed --in-place --expression="s/Architecture:.*/Architecture: ${ARCHITECTURE}/" './traefik/DEBIAN/control'
/usr/bin/sed --in-place --expression="s/Version:.*/Version: ${VERSION}/" './traefik/DEBIAN/control'
/usr/bin/chmod --verbose '0755' './traefik/DEBIAN/postinst'
/usr/bin/chmod --verbose '0755' './traefik/DEBIAN/postrm'
/usr/bin/chmod --verbose '0755' './traefik/DEBIAN/preinst'
/usr/bin/chmod --verbose '0755' './traefik/DEBIAN/prerm'
/usr/bin/chmod --verbose '0755' './traefik/etc/init.d/traefik'
/usr/bin/touch './traefik/etc/traefik/traefik.env'
/usr/bin/chmod --verbose '0640' './traefik/etc/traefik/traefik.env'
/usr/bin/chmod --verbose '0750' './traefik/etc/traefik/acme'
/usr/bin/chmod --verbose '0750' './traefik/etc/traefik/acme/00-export'
/usr/bin/chmod --verbose '0750' './traefik/etc/traefik/acme/01-changelog'
/usr/bin/chmod --verbose '0640' './traefik/etc/traefik/acme/acme.env'
/usr/bin/install --directory --verbose './traefik/usr/sbin'
/usr/bin/mv --verbose './binaries/traefik' './traefik/usr/sbin'
- name: Debian Package [Build]
env:
ARCHITECTURE: ${{ matrix.architecture }}
VERSION: ${{ steps.environment.outputs.version }}
run: |
/usr/bin/dpkg-gen './traefik'
/usr/bin/mv --verbose './traefik.deb' "./traefik_${VERSION}_${ARCHITECTURE}.deb"
- name: Debian Repository [Prepare]
env:
ARCHITECTURE: ${{ matrix.architecture }}
CODENAME: ${{ matrix.codename }}
COMPONENT: ${{ matrix.component }}
REPOSITORY_SSH_PRIVATE_KEY: ${{ secrets.REPOSITORY_SSH_PRIVATE_KEY }}
VERSION: ${{ steps.environment.outputs.version }}
run: |
/usr/bin/echo "${REPOSITORY_SSH_PRIVATE_KEY}" > './id_ed25519'
/usr/bin/chmod --quiet '0400' './id_ed25519'
/usr/bin/echo "REPOSITORY_CODENAME='${CODENAME}'" > "./traefik_${VERSION}_${ARCHITECTURE}.cfg"
/usr/bin/echo "Set Configuration 'REPOSITORY_CODENAME' to '${CODENAME}'"
/usr/bin/echo "REPOSITORY_COMPONENT='${COMPONENT}'" >> "./traefik_${VERSION}_${ARCHITECTURE}.cfg"
/usr/bin/echo "Set Configuration 'REPOSITORY_COMPONENT' to '${COMPONENT}'"
- name: Publish Package [Release]
uses: https://gitea.com/actions/gitea-release-action@v1
with:
name: Traefik v${{ steps.environment.outputs.version }}
tag_name: v${{ steps.environment.outputs.version }}
files: |
traefik_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.deb
- name: Debian Package [Debian Repository Publish]
env:
ARCHITECTURE: ${{ matrix.architecture }}
REPOSITORY_SSH_HOSTNAME: ${{ secrets.REPOSITORY_SSH_HOSTNAME }}
REPOSITORY_SSH_USER: ${{ secrets.REPOSITORY_SSH_USER }}
REPOSITORY_DESTINATION: ${{ secrets.REPOSITORY_DESTINATION }}
VERSION: ${{ steps.environment.outputs.version }}
run: |
/usr/bin/scp -4 -B -C -i './id_ed25519' -o 'LogLevel QUIET' -o 'StrictHostKeyChecking no' -o "UserKnownHostsFile '/dev/null'" "./traefik_${VERSION}_${ARCHITECTURE}.deb" "${REPOSITORY_SSH_USER}"@"${REPOSITORY_SSH_HOSTNAME}":"${REPOSITORY_DESTINATION}/traefik_${VERSION}_${ARCHITECTURE}.deb"
/usr/bin/scp -4 -B -C -i './id_ed25519' -o 'LogLevel QUIET' -o 'StrictHostKeyChecking no' -o "UserKnownHostsFile '/dev/null'" "./traefik_${VERSION}_${ARCHITECTURE}.cfg" "${REPOSITORY_SSH_USER}"@"${REPOSITORY_SSH_HOSTNAME}":"${REPOSITORY_DESTINATION}/traefik_${VERSION}_${ARCHITECTURE}.cfg"