2022-07-11 13:36:59 +00:00
|
|
|
name: Docker Static
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- 'published'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
msg:
|
|
|
|
description: "Set message"
|
|
|
|
default: "Manual trigger"
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
|
2023-01-22 10:10:26 +00:00
|
|
|
### CI Docs
|
2023-01-06 15:34:22 +00:00
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
# build-ui , create/compile the web
|
|
|
|
### install wasm
|
|
|
|
### install rollup
|
2022-07-15 13:02:35 +00:00
|
|
|
### run app/build.sh
|
2022-07-11 13:36:59 +00:00
|
|
|
### upload artifacts
|
|
|
|
|
2023-01-22 10:10:26 +00:00
|
|
|
# build-bin
|
|
|
|
## build-armhf, build-aarch64, build-amd64 , create binary for respective arch
|
|
|
|
#######################################################################################
|
|
|
|
# GitHub actions randomly timeout when downloading musl-gcc, using custom dev image #
|
|
|
|
# Look into .github/workflows/Dockerfile.dev for development image details #
|
|
|
|
# Using lldap dev image based on https://hub.docker.com/_/rust and musl-gcc bundled #
|
|
|
|
#######################################################################################
|
2022-07-11 13:36:59 +00:00
|
|
|
### Cargo build
|
2023-01-22 10:10:26 +00:00
|
|
|
### aarch64 and amd64 is musl based
|
|
|
|
### armv7 is glibc based, musl had issue with time_t when cross compile https://github.com/rust-lang/libc/issues/1848
|
2022-07-11 13:36:59 +00:00
|
|
|
|
|
|
|
# build-ui,builds-armhf, build-aarch64, build-amd64 will upload artifacts will be used next job
|
2023-01-22 10:10:26 +00:00
|
|
|
|
|
|
|
# lldap-test
|
|
|
|
### will run lldap with postgres, mariadb and sqlite backend, do selfcheck command.
|
|
|
|
|
|
|
|
# Build docker image
|
|
|
|
### Triplet docker image arch with debian base
|
|
|
|
### amd64 & aarch64 with alpine base
|
2022-07-11 13:36:59 +00:00
|
|
|
# build-docker-image job will fetch artifacts and run Dockerfile.ci then push the image.
|
2023-01-22 10:10:26 +00:00
|
|
|
### Look into .github/workflows/Dockerfile.ci.debian or .github/workflowds/Dockerfile.ci.alpine
|
2022-07-11 13:36:59 +00:00
|
|
|
|
2023-01-22 10:10:26 +00:00
|
|
|
# create release artifacts
|
|
|
|
### Fetch artifacts
|
|
|
|
### Clean up web artifact
|
|
|
|
### Setup folder structure
|
|
|
|
### Compress
|
|
|
|
### Upload
|
|
|
|
|
|
|
|
# cache based on Cargo.lock per cargo target
|
2022-07-11 13:36:59 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-03-27 12:19:11 +00:00
|
|
|
pre_job:
|
|
|
|
continue-on-error: true
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
|
|
steps:
|
|
|
|
- id: skip_check
|
|
|
|
uses: fkirc/skip-duplicate-actions@master
|
|
|
|
with:
|
|
|
|
concurrent_skipping: 'outdated_runs'
|
|
|
|
skip_after_successful_duplicate: 'true'
|
|
|
|
paths_ignore: '["**/*.md", "**/docs/**", "example_configs/**", "*.sh", ".gitignore", "lldap_config.docker_template.toml"]'
|
|
|
|
do_not_skip: '["workflow_dispatch", "schedule"]'
|
|
|
|
cancel_others: true
|
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
build-ui:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-27 12:19:11 +00:00
|
|
|
needs: pre_job
|
|
|
|
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
2022-07-15 13:02:35 +00:00
|
|
|
container:
|
2023-01-06 15:34:22 +00:00
|
|
|
image: nitnelave/rust-dev:latest
|
2022-07-11 13:36:59 +00:00
|
|
|
steps:
|
2023-01-06 15:34:22 +00:00
|
|
|
- name: Checkout repository
|
2023-03-27 07:14:26 +00:00
|
|
|
uses: actions/checkout@v3.5.0
|
2022-07-11 13:36:59 +00:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
/usr/local/cargo/bin
|
|
|
|
/usr/local/cargo/registry/index
|
|
|
|
/usr/local/cargo/registry/cache
|
|
|
|
/usr/local/cargo/git/db
|
|
|
|
target
|
|
|
|
key: lldap-ui-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
lldap-ui-
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Install rollup (nodejs)
|
2022-08-01 13:43:29 +00:00
|
|
|
run: npm install -g rollup
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Add wasm target (rust)
|
2023-01-06 15:34:22 +00:00
|
|
|
run: rustup target add wasm32-unknown-unknown
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Install wasm-pack with cargo
|
2022-08-01 13:43:29 +00:00
|
|
|
run: cargo install wasm-pack || true
|
2022-09-10 11:01:42 +00:00
|
|
|
env:
|
|
|
|
RUSTFLAGS: ""
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Build frontend
|
2022-07-11 13:36:59 +00:00
|
|
|
run: ./app/build.sh
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Check build path
|
2022-07-11 13:36:59 +00:00
|
|
|
run: ls -al app/
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Upload ui artifacts
|
2022-07-11 13:36:59 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ui
|
|
|
|
path: app/
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
|
2023-01-22 10:10:26 +00:00
|
|
|
build-bin:
|
2022-07-11 13:36:59 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-03-27 12:19:11 +00:00
|
|
|
needs: pre_job
|
|
|
|
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
2023-01-22 10:10:26 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [armv7-unknown-linux-gnueabihf, aarch64-unknown-linux-musl, x86_64-unknown-linux-musl]
|
2022-07-15 13:02:35 +00:00
|
|
|
container:
|
2022-08-01 13:09:17 +00:00
|
|
|
image: nitnelave/rust-dev:latest
|
2022-07-11 13:36:59 +00:00
|
|
|
env:
|
2023-01-22 10:10:26 +00:00
|
|
|
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
|
2022-07-31 03:20:26 +00:00
|
|
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-musl-gcc
|
2023-01-22 10:10:26 +00:00
|
|
|
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: x86_64-linux-musl-gcc
|
2022-07-11 13:36:59 +00:00
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
RUSTFLAGS: -Ctarget-feature=+crt-static
|
|
|
|
CARGO_HOME: ${GITHUB_WORKSPACE}/.cargo
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-03-27 07:14:26 +00:00
|
|
|
uses: actions/checkout@v3.5.0
|
2022-07-11 13:36:59 +00:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.cargo/bin
|
|
|
|
.cargo/registry/index
|
|
|
|
.cargo/registry/cache
|
|
|
|
.cargo/git/db
|
|
|
|
target
|
2023-01-22 10:10:26 +00:00
|
|
|
key: lldap-bin-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
2022-07-11 13:36:59 +00:00
|
|
|
restore-keys: |
|
2023-01-22 10:10:26 +00:00
|
|
|
lldap-bin-${{ matrix.target }}-
|
2023-03-20 22:50:23 +00:00
|
|
|
- name: Compile ${{ matrix.target }} lldap and tools
|
|
|
|
run: cargo build --target=${{ matrix.target }} --release -p lldap -p migration-tool -p lldap_set_password
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Check path
|
|
|
|
run: ls -al target/release
|
|
|
|
- name: Upload ${{ matrix.target}} lldap artifacts
|
2022-07-11 13:36:59 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-01-22 10:10:26 +00:00
|
|
|
name: ${{ matrix.target}}-lldap-bin
|
|
|
|
path: target/${{ matrix.target }}/release/lldap
|
|
|
|
- name: Upload ${{ matrix.target }} migration tool artifacts
|
2022-07-11 13:36:59 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-01-22 10:10:26 +00:00
|
|
|
name: ${{ matrix.target }}-migration-tool-bin
|
|
|
|
path: target/${{ matrix.target }}/release/migration-tool
|
2023-03-20 22:50:23 +00:00
|
|
|
- name: Upload ${{ matrix.target }} password tool artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.target }}-lldap_set_password-bin
|
|
|
|
path: target/${{ matrix.target }}/release/lldap_set_password
|
2022-07-11 13:36:59 +00:00
|
|
|
|
2023-01-22 10:10:26 +00:00
|
|
|
lldap-database-integration-test:
|
|
|
|
needs: [build-ui,build-bin]
|
|
|
|
name: LLDAP test
|
2022-07-11 13:36:59 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-22 10:10:26 +00:00
|
|
|
services:
|
|
|
|
mariadb:
|
|
|
|
image: mariadb:latest
|
|
|
|
ports:
|
|
|
|
- 3306:3306
|
|
|
|
env:
|
|
|
|
MYSQL_USER: lldapuser
|
|
|
|
MYSQL_PASSWORD: lldappass
|
|
|
|
MYSQL_DATABASE: lldap
|
|
|
|
MYSQL_ROOT_PASSWORD: rootpass
|
|
|
|
|
|
|
|
postgresql:
|
|
|
|
image: postgres:latest
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
env:
|
|
|
|
POSTGRES_USER: lldapuser
|
|
|
|
POSTGRES_PASSWORD: lldappass
|
|
|
|
POSTGRES_DB: lldap
|
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
steps:
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Download artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: x86_64-unknown-linux-musl-lldap-bin
|
|
|
|
path: bin/
|
|
|
|
- name: Where is the bin?
|
|
|
|
run: ls -alR bin
|
|
|
|
- name: Set executables to LLDAP
|
|
|
|
run: chmod +x bin/lldap
|
|
|
|
|
|
|
|
- name: Run lldap with postgres DB and healthcheck
|
|
|
|
run: |
|
|
|
|
bin/lldap run &
|
|
|
|
sleep 10s
|
|
|
|
bin/lldap healthcheck
|
|
|
|
env:
|
|
|
|
LLDAP_database_url: postgres://lldapuser:lldappass@localhost/lldap
|
|
|
|
LLDAP_ldap_port: 3890
|
|
|
|
LLDAP_http_port: 17170
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run lldap with mariadb DB (MySQL Compatible) and healthcheck
|
|
|
|
run: |
|
|
|
|
bin/lldap run &
|
|
|
|
sleep 10s
|
|
|
|
bin/lldap healthcheck
|
|
|
|
env:
|
|
|
|
LLDAP_database_url: mysql://lldapuser:lldappass@localhost/lldap
|
|
|
|
LLDAP_ldap_port: 3891
|
|
|
|
LLDAP_http_port: 17171
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run lldap with sqlite DB and healthcheck
|
|
|
|
run: |
|
|
|
|
bin/lldap run &
|
|
|
|
sleep 10s
|
|
|
|
bin/lldap healthcheck
|
|
|
|
env:
|
|
|
|
LLDAP_database_url: sqlite://users.db?mode=rwc
|
|
|
|
LLDAP_ldap_port: 3892
|
|
|
|
LLDAP_http_port: 17172
|
2022-07-11 13:36:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
build-docker-image:
|
2023-01-22 10:10:26 +00:00
|
|
|
needs: [build-ui, build-bin]
|
2022-07-11 13:36:59 +00:00
|
|
|
name: Build Docker image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
steps:
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Checkout repository
|
2023-03-27 07:14:26 +00:00
|
|
|
uses: actions/checkout@v3.5.0
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Download all artifacts
|
2022-07-11 13:36:59 +00:00
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
2023-01-06 15:34:22 +00:00
|
|
|
path: bin
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
- name: Download llap ui artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ui
|
|
|
|
path: web
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Setup QEMU
|
2022-07-11 13:36:59 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- uses: docker/setup-buildx-action@v2
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
|
|
|
images: |
|
|
|
|
nitnelave/lldap
|
|
|
|
# generate Docker tags based on the following events/attributes
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
type=semver,pattern={{major}}
|
|
|
|
type=sha
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
- name: parse tag
|
|
|
|
uses: gacts/github-slug@v1
|
|
|
|
id: slug
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
- name: Login to Docker Hub
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2022-08-01 16:21:25 +00:00
|
|
|
|
2023-01-06 15:34:22 +00:00
|
|
|
########################################
|
|
|
|
#### docker image :latest tag build ####
|
|
|
|
########################################
|
2022-07-18 03:52:02 +00:00
|
|
|
- name: Build and push latest alpine
|
2022-07-11 13:36:59 +00:00
|
|
|
if: github.event_name != 'release'
|
2023-01-30 20:07:23 +00:00
|
|
|
uses: docker/build-push-action@v4
|
2022-07-11 13:36:59 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
2022-07-18 03:52:02 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-07-11 13:36:59 +00:00
|
|
|
file: ./.github/workflows/Dockerfile.ci.alpine
|
2022-08-01 16:21:25 +00:00
|
|
|
tags: nitnelave/lldap:latest, nitnelave/lldap:latest-alpine
|
2023-01-22 10:10:26 +00:00
|
|
|
cache-from: type=gha,mode=max
|
|
|
|
cache-to: type=gha,mode=max
|
2022-08-01 16:21:25 +00:00
|
|
|
|
2022-07-18 03:52:02 +00:00
|
|
|
- name: Build and push latest debian
|
|
|
|
if: github.event_name != 'release'
|
2023-01-30 20:07:23 +00:00
|
|
|
uses: docker/build-push-action@v4
|
2022-07-18 03:52:02 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
|
|
file: ./.github/workflows/Dockerfile.ci.debian
|
|
|
|
tags: nitnelave/lldap:latest-debian
|
2023-01-22 10:10:26 +00:00
|
|
|
cache-from: type=gha,mode=max
|
|
|
|
cache-to: type=gha,mode=max
|
2022-08-01 16:21:25 +00:00
|
|
|
|
2023-01-06 15:34:22 +00:00
|
|
|
########################################
|
|
|
|
#### docker image :semver tag build ####
|
|
|
|
########################################
|
2022-07-18 03:52:02 +00:00
|
|
|
- name: Build and push release alpine
|
|
|
|
if: github.event_name == 'release'
|
2023-01-30 20:07:23 +00:00
|
|
|
uses: docker/build-push-action@v4
|
2022-07-18 03:52:02 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: true
|
|
|
|
# Tag as latest, stable, semver, major, major.minor and major.minor.patch.
|
|
|
|
file: ./.github/workflows/Dockerfile.ci.alpine
|
2022-08-01 08:35:38 +00:00
|
|
|
tags: nitnelave/lldap:stable, nitnelave/lldap:stable-alpine, nitnelave/lldap:v${{ steps.slug.outputs.version-semantic }}, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}.${{ steps.slug.outputs.version-patch }}, nitnelave/lldap:v${{ steps.slug.outputs.version-semantic }}-alpine, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}-alpine, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}-alpine.${{ steps.slug.outputs.version-minor }}-alpine, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}.${{ steps.slug.outputs.version-patch }}-alpine
|
2023-01-22 10:10:26 +00:00
|
|
|
cache-from: type=gha,mode=max
|
|
|
|
cache-to: type=gha,mode=max
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2022-07-18 03:52:02 +00:00
|
|
|
- name: Build and push release debian
|
2022-07-11 13:36:59 +00:00
|
|
|
if: github.event_name == 'release'
|
2023-01-30 20:07:23 +00:00
|
|
|
uses: docker/build-push-action@v4
|
2022-07-11 13:36:59 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
|
|
push: true
|
|
|
|
# Tag as latest, stable, semver, major, major.minor and major.minor.patch.
|
2022-07-18 03:52:02 +00:00
|
|
|
file: ./.github/workflows/Dockerfile.ci.debian
|
|
|
|
tags: nitnelave/lldap:stable-debian, nitnelave/lldap:v${{ steps.slug.outputs.version-semantic }}-debian, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}-debian, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}-debian, nitnelave/lldap:v${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}.${{ steps.slug.outputs.version-patch }}-debian
|
2023-01-22 10:10:26 +00:00
|
|
|
cache-from: type=gha,mode=max
|
|
|
|
cache-to: type=gha,mode=max
|
2022-07-15 13:02:35 +00:00
|
|
|
|
2022-07-11 13:36:59 +00:00
|
|
|
- name: Update repo description
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
uses: peter-evans/dockerhub-description@v3
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
repository: nitnelave/lldap
|
|
|
|
|
2023-01-06 15:34:22 +00:00
|
|
|
###############################################################
|
|
|
|
### Download artifacts, clean up ui, upload to release page ###
|
|
|
|
###############################################################
|
2022-10-12 15:49:41 +00:00
|
|
|
create-release-artifacts:
|
2023-01-22 10:10:26 +00:00
|
|
|
needs: [build-ui, build-bin]
|
2022-10-12 15:49:41 +00:00
|
|
|
name: Create release artifacts
|
|
|
|
if: github.event_name == 'release'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Download all artifacts
|
2022-10-12 15:49:41 +00:00
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
2023-01-06 15:34:22 +00:00
|
|
|
path: bin/
|
|
|
|
- name: Check file
|
|
|
|
run: ls -alR bin/
|
|
|
|
- name: Fixing Filename
|
|
|
|
run: |
|
2023-01-22 10:10:26 +00:00
|
|
|
mv bin/aarch64-unknown-linux-musl-lldap-bin/lldap bin/aarch64-lldap
|
|
|
|
mv bin/x86_64-unknown-linux-musl-lldap-bin/lldap bin/amd64-lldap
|
|
|
|
mv bin/armv7-unknown-linux-gnueabihf-lldap-bin/lldap bin/armhf-lldap
|
|
|
|
mv bin/aarch64-unknown-linux-musl-migration-tool-bin/migration-tool bin/aarch64-migration-tool
|
|
|
|
mv bin/x86_64-unknown-linux-musl-migration-tool-bin/migration-tool bin/amd64-migration-tool
|
|
|
|
mv bin/armv7-unknown-linux-gnueabihf-migration-tool-bin/migration-tool bin/armhf-migration-tool
|
2023-03-20 22:50:23 +00:00
|
|
|
mv bin/aarch64-unknown-linux-musl-lldap_set_password-bin/lldap_set_password bin/aarch64-lldap_set_password
|
|
|
|
mv bin/x86_64-unknown-linux-musl-lldap_set_password-bin/lldap_set_password bin/amd64-lldap_set_password
|
|
|
|
mv bin/armv7-unknown-linux-gnueabihf-lldap_set_password-bin/lldap_set_password bin/armhf-lldap_set_password
|
2023-01-06 15:34:22 +00:00
|
|
|
chmod +x bin/*-lldap
|
|
|
|
chmod +x bin/*-migration-tool
|
2023-03-20 22:50:23 +00:00
|
|
|
chmod +x bin/*-lldap_set_password
|
2022-10-12 15:49:41 +00:00
|
|
|
|
|
|
|
- name: Download llap ui artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ui
|
|
|
|
path: web
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: UI (web) artifacts cleanup
|
2022-10-12 15:49:41 +00:00
|
|
|
run: mkdir app && mv web/index.html app/index.html && mv web/static app/static && mv web/pkg app/pkg
|
2023-01-05 14:36:01 +00:00
|
|
|
- name: Fetch web components
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install wget
|
|
|
|
for file in $(cat app/static/libraries.txt); do wget -P app/static "$file"; done
|
|
|
|
for file in $(cat app/static/fonts/fonts.txt); do wget -P app/static/fonts "$file"; done
|
|
|
|
chmod a+r -R .
|
2023-01-06 15:34:22 +00:00
|
|
|
|
|
|
|
- name: Setup LLDAP dir for packing
|
|
|
|
run: |
|
|
|
|
mkdir aarch64-lldap
|
|
|
|
mkdir amd64-lldap
|
|
|
|
mkdir armhf-lldap
|
|
|
|
mv bin/aarch64-lldap aarch64-lldap/lldap
|
|
|
|
mv bin/amd64-lldap amd64-lldap/lldap
|
|
|
|
mv bin/armhf-lldap armhf-lldap/lldap
|
|
|
|
mv bin/aarch64-migration-tool aarch64-lldap/migration-tool
|
|
|
|
mv bin/amd64-migration-tool amd64-lldap/migration-tool
|
|
|
|
mv bin/armhf-migration-tool armhf-lldap/migration-tool
|
2023-03-20 22:50:23 +00:00
|
|
|
mv bin/aarch64-lldap_set_password aarch64-lldap/lldap_set_password
|
|
|
|
mv bin/amd64-lldap_set_password amd64-lldap/lldap_set_password
|
|
|
|
mv bin/armhf-lldap_set_password armhf-lldap/lldap_set_password
|
2023-01-06 15:34:22 +00:00
|
|
|
cp -r app aarch64-lldap/
|
|
|
|
cp -r app amd64-lldap/
|
|
|
|
cp -r app armhf-lldap/
|
|
|
|
ls -alR aarch64-lldap/
|
|
|
|
ls -alR amd64-lldap/
|
|
|
|
ls -alR armhf-lldap/
|
|
|
|
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Packing LLDAP and Web UI
|
2023-01-06 15:34:22 +00:00
|
|
|
run: |
|
|
|
|
tar -czvf aarch64-lldap.tar.gz aarch64-lldap/
|
|
|
|
tar -czvf amd64-lldap.tar.gz amd64-lldap/
|
|
|
|
tar -czvf armhf-lldap.tar.gz armhf-lldap/
|
2022-10-12 15:49:41 +00:00
|
|
|
|
|
|
|
|
2023-01-22 10:10:26 +00:00
|
|
|
- name: Upload compressed release
|
2022-10-12 15:49:41 +00:00
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
id: create_release
|
|
|
|
with:
|
|
|
|
allowUpdates: true
|
2023-01-06 15:34:22 +00:00
|
|
|
artifacts: aarch64-lldap.tar.gz,
|
|
|
|
amd64-lldap.tar.gz,
|
|
|
|
armhf-lldap.tar.gz
|
2022-10-12 15:49:41 +00:00
|
|
|
env:
|
2022-11-25 09:07:50 +00:00
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|