You've already forked DDNS-Client
80 lines
4.0 KiB
YAML
80 lines
4.0 KiB
YAML
name: DDNS-Client
|
|
on:
|
|
push:
|
|
branches:
|
|
- release
|
|
jobs:
|
|
workflow:
|
|
name: DDNS-Client
|
|
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: Debian Package [Prepare]
|
|
env:
|
|
ARCHITECTURE: ${{ matrix.architecture }}
|
|
VERSION: ${{ steps.environment.outputs.version }}
|
|
run: |
|
|
/usr/bin/sed --in-place --expression="s/Architecture:.*/Architecture: ${ARCHITECTURE}/" './ddns-client/DEBIAN/control'
|
|
/usr/bin/sed --in-place --expression="s/Version:.*/Version: ${VERSION}/" './ddns-client/DEBIAN/control'
|
|
/usr/bin/chmod --verbose '0755' './ddns-client/DEBIAN/postinst'
|
|
/usr/bin/chmod --verbose '0755' './ddns-client/DEBIAN/postrm'
|
|
/usr/bin/chmod --verbose '0755' './ddns-client/DEBIAN/prerm'
|
|
/usr/bin/chmod --verbose '0755' './ddns-client/usr/lib/ddns-client/check_conditions'
|
|
/usr/bin/chmod --verbose '0755' './ddns-client/usr/lib/ddns-client/start_update'
|
|
- name: Debian Package [Build]
|
|
env:
|
|
ARCHITECTURE: ${{ matrix.architecture }}
|
|
VERSION: ${{ steps.environment.outputs.version }}
|
|
run: |
|
|
/usr/bin/dpkg-gen './ddns-client'
|
|
/usr/bin/mv --verbose './ddns-client.deb' "./ddns-client_${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}'" > "./ddns-client_${VERSION}_${ARCHITECTURE}.cfg"
|
|
/usr/bin/echo "Set Configuration 'REPOSITORY_CODENAME' to '${CODENAME}'"
|
|
/usr/bin/echo "REPOSITORY_COMPONENT='${COMPONENT}'" >> "./ddns-client_${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: DDNS-Client v${{ steps.environment.outputs.version }}
|
|
tag_name: v${{ steps.environment.outputs.version }}
|
|
files: |
|
|
ddns-client_${{ 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'" "./ddns-client_${VERSION}_${ARCHITECTURE}.deb" "${REPOSITORY_SSH_USER}"@"${REPOSITORY_SSH_HOSTNAME}":"${REPOSITORY_DESTINATION}/ddns-client_${VERSION}_${ARCHITECTURE}.deb"
|
|
/usr/bin/scp -4 -B -C -i './id_ed25519' -o 'LogLevel QUIET' -o 'StrictHostKeyChecking no' -o "UserKnownHostsFile '/dev/null'" "./ddns-client_${VERSION}_${ARCHITECTURE}.cfg" "${REPOSITORY_SSH_USER}"@"${REPOSITORY_SSH_HOSTNAME}":"${REPOSITORY_DESTINATION}/ddns-client_${VERSION}_${ARCHITECTURE}.cfg"
|