Skip to content

Commit 845fa8d

Browse files
authored
Merge pull request #73 from soubinan/features
remove manual run..
2 parents 4e6d47b + 868f43e commit 845fa8d

File tree

3 files changed

+12
-23
lines changed

3 files changed

+12
-23
lines changed

.github/workflows/builder.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ jobs:
5454

5555
image-build:
5656
needs: init
57-
if: ${{needs.init.outputs.app_version}} != "null" && ${{needs.init.outputs.app_version}} != ""
57+
if: ${{needs.init.outputs.app_version != 'null' && needs.init.outputs.app_version != ''}}
5858
runs-on: ubuntu-latest
5959
strategy:
6060
matrix:
61-
architectures: ${{ fromJson(needs.init.outputs.architectures) }}
61+
architectures: ${{fromJson(needs.init.outputs.architectures)}}
6262
steps:
6363
- name: Check submitted version
6464
id: version-check
@@ -73,15 +73,15 @@ jobs:
7373
- name: Check necessary steps
7474
id: validity-checks
7575
run: |
76-
echo "IS_BUILDABLE=${{github.event_name != 'schedule' || (steps.version-check.outputs.SUBMITTED_BUILD_ID != steps.version-check.outputs.CHECKED_BUILD_ID && github.event_name == 'schedule')}}" >> $GITHUB_OUTPUT
77-
echo "IS_PUBLISHABLE=${{inputs.branch_name == 'test' || (steps.version-check.outputs.SUBMITTED_BUILD_ID != steps.version-check.outputs.CHECKED_BUILD_ID && github.event_name == 'schedule') || (inputs.branch_name == 'main' && inputs.is_merged == true)}}" >> $GITHUB_OUTPUT
76+
echo "IS_BUILDABLE=${{github.event_name == 'pull_request' || (steps.version-check.outputs.SUBMITTED_BUILD_ID != steps.version-check.outputs.CHECKED_BUILD_ID && github.event_name == 'schedule')}}" >> $GITHUB_OUTPUT
77+
echo "IS_PUBLISHABLE=${{inputs.branch_name == 'test' || (inputs.branch_name == 'main' && inputs.is_merged == true)}}" >> $GITHUB_OUTPUT
7878
7979
- name: Check out repository
8080
uses: actions/checkout@v4
81-
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == true
81+
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true'}}
8282

8383
- name: Install required tools
84-
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == true
84+
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true'}}
8585
run: |
8686
sudo apt-get update -y
8787
sudo apt-get install -y debootstrap squashfs-tools wget unzip python3 python3-pip
@@ -95,12 +95,12 @@ jobs:
9595
sudo -v ; wget -q https://kcl-lang.io/script/install-cli.sh -O - | sudo bash
9696
9797
- name: Create Distrobuilder LXC template file
98-
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == true
98+
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true'}}
9999
run: |
100100
kcl run ${{github.workspace}}/__layout.k -D input=${{github.workspace}}/${{inputs.config_path}} -o /tmp/${{needs.init.outputs.app_name}}.build
101101
102102
- name: Build Image
103-
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == true
103+
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true'}}
104104
run: |
105105
sudo distrobuilder --cache-dir /tmp/cache/${{needs.init.outputs.app_name}} build-lxc /tmp/${{needs.init.outputs.app_name}}.build -o image.serial="${{needs.init.outputs.app_version}}" -o image.architecture=${{matrix.architectures}} /tmp/output/${{needs.init.outputs.app_name}}/
106106
mv /tmp/output/${{needs.init.outputs.app_name}}/rootfs.tar.xz ./${{needs.init.outputs.app_name}}-${{needs.init.outputs.app_version}}-${{matrix.architectures}}-root.tar.xz
@@ -109,7 +109,7 @@ jobs:
109109
pwd && ls -lash
110110
111111
- name: Publish Image files
112-
if: ${{steps.validity-checks.outputs.IS_PUBLISHABLE}} == true
112+
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true' && steps.validity-checks.outputs.IS_PUBLISHABLE == 'true'}}
113113
run: |
114114
cat << EOF > /tmp/rclone.conf
115115
$RCLONE_CONFIG
@@ -124,7 +124,7 @@ jobs:
124124
RCLONE_CONFIG_PASS: ${{secrets.RCLONE_CONFIG_PASS}}
125125

126126
- name: Publish Image metadata
127-
if: ${{steps.validity-checks.outputs.IS_PUBLISHABLE}} == true
127+
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true' && steps.validity-checks.outputs.IS_PUBLISHABLE == 'true'}}
128128
run: |
129129
CATEGORIES_STR="${{needs.init.outputs.categories}}"
130130
CATEGORIES_FMT=$(echo "[\"$CATEGORIES_STR\"]" | sed -E 's/^\["[ ,]+/["/g' | sed -E 's/[ ,]+"]$/"]/g' | sed -E 's/ *, */","/g')

.github/workflows/trigger.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ on:
1414
- "./templates/*"
1515
schedule:
1616
- cron: "0 0 */7 * *"
17-
workflow_dispatch:
18-
inputs:
19-
logLevel:
20-
description: "Log level"
21-
required: true
22-
default: "warning"
23-
type: choice
24-
options:
25-
- warning
26-
- info
27-
- debug
2817

2918
jobs:
3019
init:
@@ -38,7 +27,7 @@ jobs:
3827
uses: tj-actions/changed-files@v45
3928
with:
4029
files: templates/**
41-
if: ${{github.event_name}} == 'pull_request'
30+
if: ${{github.event_name == 'pull_request'}}
4231

4332
- name: List all templates
4433
id: all-templates-list

templates/zitadel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ instructions:
7676
7777
mkdir -p /opt/zitadel
7878
echo "ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=$(/usr/bin/openssl rand -hex 16)" >> /opt/zitadel/.env
79-
echo "ZITADEL_MASTERKEY=$(/usr/bin/openssl rand -hex 32)" >> /opt/zitadel/.env
79+
echo "ZITADEL_MASTERKEY=$(/usr/bin/openssl rand -hex 16)" >> /opt/zitadel/.env
8080
8181
PG_VERSION=$(ls -1 /etc/postgresql)
8282

0 commit comments

Comments
 (0)