-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:calaos/calaos-container into main
- Loading branch information
Showing
21 changed files
with
548 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
name: Build deb package | ||
name: Build et release debian package | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
inputs: | ||
vincrement: | ||
description: 'Package version increment (major.minor.patch)' | ||
required: true | ||
default: 'patch' | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
- prerelease | ||
|
||
|
||
jobs: | ||
build-and-push-deb-pkg: | ||
name: Build deb package and push to repositories | ||
|
@@ -16,48 +27,39 @@ jobs: | |
|
||
- name: Fetch latest release version | ||
id: fetch-latest-release | ||
uses: reloc8/[email protected] | ||
|
||
- name: Increment dev release version | ||
id: bump_version | ||
uses: actionsdesk/[email protected] | ||
with: | ||
prerelease: withBuildNumber | ||
prelabel: alpha | ||
initial_version: ${{ steps.fetch-latest-release.outputs.latest-release }} | ||
uses: actions-ecosystem/action-get-latest-tag@v1 | ||
|
||
- name: Build package | ||
uses: addnab/docker-run-action@v3 | ||
id: build | ||
with: | ||
image: ghcr.io/calaos/debian_deb_build_base | ||
options: -v ${{ github.workspace }}:/work | ||
run: | | ||
/build-deb.sh ${{ steps.bump_version.outputs.release }} | ||
git config --global --add safe.directory /work | ||
last_tag=$(python3 /get_last_tag.py /work) | ||
export release=$(pysemver bump ${{ github.event.inputs.vincrement || 'prerelease' }} ${last_tag}) | ||
echo Build version: $release | ||
/build-deb.sh $release && echo "::set-output name=release::$release" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: deb | ||
path: pkg/*.deb | ||
|
||
- name: Create Tag | ||
uses: negz/create-tag@v1 | ||
with: | ||
version: ${{ steps.bump_version.outputs.release }} | ||
token: ${{ secrets.ACTION_DISPATCH }} | ||
|
||
- name: Create a Release | ||
uses: meeDamian/[email protected] | ||
with: | ||
token: ${{ secrets.ACTION_DISPATCH }} | ||
tag: ${{ steps.bump_version.outputs.release }} | ||
name: ${{ steps.bump_version.outputs.release }} | ||
tag: ${{ steps.build.outputs.release }} | ||
name: ${{ steps.build.outputs.release }} | ||
prerelease: false | ||
files: pkg/*.deb | ||
prerelease: true | ||
gzip: false | ||
|
||
- name: Update repo cache | ||
uses: distributhor/workflow-webhook@v3 | ||
env: | ||
webhook_url: ${{ secrets.WEBHOOK_URL }} | ||
webhook_secret: ${{ secrets.WEBHOOK_SECRET }} | ||
webhook_secret: ${{ secrets.WEBHOOK_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
# calaos-container | ||
Container management daemon for calaos-os. | ||
Container management daemon for calaos-os. | ||
|
||
# build calaos-container | ||
To get list of build targets: | ||
``` | ||
make help | ||
``` | ||
|
||
To build: | ||
``` | ||
make | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
.PHONY: libcalaos-apt.so | ||
|
||
all: | ||
@rm -fr build | ||
meson setup build --prefix=/usr | ||
meson compile -C build | ||
meson install -C build | ||
|
||
install: all | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,5 @@ | ||
bin/calaos-container usr/bin | ||
bin/calaos-os usr/bin | ||
scripts/start_calaos_home.sh usr/bin | ||
calaos-container.toml etc | ||
env/calaos.sh etc/profile.d | ||
scripts/calaos_install.sh usr/sbin | ||
scripts/calaos_rollback.sh usr/sbin | ||
scripts/init_calaosfs.sh usr/sbin | ||
scripts/haproxy_pre.sh usr/sbin | ||
scripts/mosquitto_pre.sh usr/sbin | ||
scripts/zigbee2mqtt_pre.sh usr/sbin | ||
scripts/load_containers_cache.sh usr/sbin | ||
scripts/arch-chroot usr/sbin | ||
scripts/genfstab usr/sbin | ||
initramfs/hooks/grub-btrfs-overlay usr/share/initramfs-tools/hooks/grub-btrfs-overlay | ||
initramfs/scripts/local-bottom/grub-btrfs-overlay usr/share/initramfs-tools/scripts/local-bottom/grub-btrfs-overlay | ||
grub-btrfs/41_snapshots-btrfs etc/grub.d | ||
|
@@ -20,5 +8,4 @@ grub-btrfs/grub-btrfsd usr/bin | |
repository/calaos.gpg etc/apt/trusted.gpg.d | ||
repository/calaos.list etc/apt/sources.list.d | ||
debian/[email protected] lib/systemd/system | ||
debian/[email protected] lib/systemd/system | ||
scripts/start_z2mqtt.sh usr/bin | ||
debian/[email protected] lib/systemd/system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import git | ||
import semver | ||
import sys | ||
|
||
if len(sys.argv) < 2: | ||
print("Please provide the path to the repository as an argument.") | ||
sys.exit(1) | ||
|
||
repo = git.Repo(sys.argv[1]) | ||
tags = sorted(repo.tags, key=lambda t: t.commit.committed_datetime) | ||
print(str(max(map(semver.VersionInfo.parse, map(str, tags))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.