Initialize Git Repository: 'Traefik'
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
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 (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: Traefik [Action Cache Hit]
|
||||
uses: actions/cache/restore@v5
|
||||
id: cache-traefik
|
||||
with:
|
||||
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
|
||||
lookup-only: true
|
||||
path: |
|
||||
./sources
|
||||
- name: Traefik [Action Cache Restore]
|
||||
if: steps.cache-traefik.outputs.cache-hit == 'true'
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
|
||||
path: |
|
||||
./sources
|
||||
- name: Traefik [Download]
|
||||
if: steps.cache-traefik.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
/usr/bin/wget --verbose --output-document='./sources.tar.gz' 'https://github.com/traefik/traefik/releases/download/v${{ steps.environment.outputs.version }}/traefik_v${{ steps.environment.outputs.version }}_linux_${{ matrix.architecture }}.tar.gz'
|
||||
- name: Traefik [Extract]
|
||||
if: steps.cache-traefik.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
/usr/bin/install --directory --verbose './sources'
|
||||
/usr/bin/tar --extract --gzip --verbose --file='./sources.tar.gz' --directory='./sources'
|
||||
- name: Traefik [Action Cache Save]
|
||||
if: steps.cache-traefik.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
|
||||
path: |
|
||||
./sources
|
||||
- name: Traefik [Prepare Debian Package]
|
||||
run: |
|
||||
/usr/bin/sed --in-place --expression='s/Architecture:.*/Architecture: ${{ matrix.architecture }}/' './traefik/DEBIAN/control'
|
||||
/usr/bin/sed --in-place --expression='s/Version:.*/Version: ${{ steps.environment.outputs.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 './sources/traefik' './traefik/usr/sbin'
|
||||
- name: Debian Package [Generate]
|
||||
run: |
|
||||
/usr/bin/dpkg-gen './traefik'
|
||||
/usr/bin/mv --verbose './traefik.deb' './traefik_${{ 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 }}'" > './traefik_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg'
|
||||
/usr/bin/echo "Set Configuration 'REPOSITORY_CODENAME' to '${{ matrix.codename }}'"
|
||||
/usr/bin/echo "REPOSITORY_COMPONENT='${{ matrix.component }}'" >> './traefik_${{ 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: Traefik v${{ steps.environment.outputs.version }}
|
||||
tag_name: v${{ steps.environment.outputs.version }}
|
||||
files: |
|
||||
traefik_${{ 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'" './traefik_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.deb' '${{ secrets.REPOSITORY_SSH_USER }}'@'${{ secrets.REPOSITORY_SSH_HOSTNAME }}':'${{ secrets.REPOSITORY_DESTINATION }}/traefik_${{ 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'" './traefik_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg' '${{ secrets.REPOSITORY_SSH_USER }}'@'${{ secrets.REPOSITORY_SSH_HOSTNAME }}':'${{ secrets.REPOSITORY_DESTINATION }}/traefik_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg'
|
||||
Reference in New Issue
Block a user