You've already forked Vaultwarden
Initialize Git Repository: 'Vaultwarden'
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
name: Vaultwarden
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release
|
||||
jobs:
|
||||
workflow:
|
||||
name: Vaultwarden
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- architecture: amd64
|
||||
cicd: cicd.any
|
||||
codename: trixie noble
|
||||
component: main
|
||||
- architecture: arm64
|
||||
cicd: cicd.any
|
||||
codename: 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: Vaultwarden [Action Cache Hit]
|
||||
uses: actions/cache/restore@v5
|
||||
id: cache-vaultwarden
|
||||
with:
|
||||
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
|
||||
lookup-only: true
|
||||
path: |
|
||||
./sources
|
||||
- name: Vaultwarden [Action Cache Restore]
|
||||
if: steps.cache-vaultwarden.outputs.cache-hit == 'true'
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
|
||||
path: |
|
||||
./sources
|
||||
- name: Vaultwarden [Download & Extract]
|
||||
if: steps.cache-vaultwarden.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
/usr/bin/docker-image-extract -p 'linux/${{ matrix.architecture }}' -o './sources' 'vaultwarden/server:${{ steps.environment.outputs.version }}'
|
||||
- name: Vaultwarden [Action Cache Save]
|
||||
if: steps.cache-vaultwarden.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
key: ${{ steps.environment.outputs.version }}_${{ matrix.architecture }}
|
||||
path: |
|
||||
./sources
|
||||
- name: Vaultwarden [Prepare Debian Package]
|
||||
run: |
|
||||
/usr/bin/sed --in-place --expression='s/Architecture:.*/Architecture: ${{ matrix.architecture }}/' './vaultwarden/DEBIAN/control'
|
||||
/usr/bin/sed --in-place --expression='s/Version:.*/Version: ${{ steps.environment.outputs.version }}/' './vaultwarden/DEBIAN/control'
|
||||
/usr/bin/chmod --verbose '0755' './vaultwarden/DEBIAN/postinst'
|
||||
/usr/bin/chmod --verbose '0755' './vaultwarden/DEBIAN/postrm'
|
||||
/usr/bin/chmod --verbose '0755' './vaultwarden/DEBIAN/preinst'
|
||||
/usr/bin/chmod --verbose '0755' './vaultwarden/DEBIAN/prerm'
|
||||
/usr/bin/chmod --verbose '0755' './vaultwarden/etc/init.d/vaultwarden'
|
||||
/usr/bin/chmod --verbose '0755' './vaultwarden/usr/lib/vaultwarden/email_header_logo'
|
||||
/usr/bin/mv --verbose './sources/web-vault' './vaultwarden/usr/lib/vaultwarden/web-vault'
|
||||
/usr/bin/install --directory --verbose './vaultwarden/usr/sbin'
|
||||
/usr/bin/mv --verbose './sources/vaultwarden' './vaultwarden/usr/sbin/vaultwarden'
|
||||
- name: Debian Package [Generate]
|
||||
run: |
|
||||
/usr/bin/dpkg-gen './vaultwarden'
|
||||
/usr/bin/mv --verbose './vaultwarden.deb' './vaultwarden_${{ 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 }}'" > './vaultwarden_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg'
|
||||
/usr/bin/echo "Set Configuration 'REPOSITORY_CODENAME' to '${{ matrix.codename }}'"
|
||||
/usr/bin/echo "REPOSITORY_COMPONENT='${{ matrix.component }}'" >> './vaultwarden_${{ 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: Vaultwarden v${{ steps.environment.outputs.version }}
|
||||
tag_name: v${{ steps.environment.outputs.version }}
|
||||
files: |
|
||||
vaultwarden_${{ 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'" './vaultwarden_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.deb' '${{ secrets.REPOSITORY_SSH_USER }}'@'${{ secrets.REPOSITORY_SSH_HOSTNAME }}':'${{ secrets.REPOSITORY_DESTINATION }}/vaultwarden_${{ 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'" './vaultwarden_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg' '${{ secrets.REPOSITORY_SSH_USER }}'@'${{ secrets.REPOSITORY_SSH_HOSTNAME }}':'${{ secrets.REPOSITORY_DESTINATION }}/vaultwarden_${{ steps.environment.outputs.version }}_${{ matrix.architecture }}.cfg'
|
||||
Reference in New Issue
Block a user