Skip to content

Commit

Permalink
fix wrong usage of conditions (seems it was)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soubinan committed Jan 16, 2025
1 parent c707967 commit 868f43e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ jobs:

image-build:
needs: init
if: ${{needs.init.outputs.app_version}} != "null" && ${{needs.init.outputs.app_version}} != ""
if: ${{needs.init.outputs.app_version != 'null' && needs.init.outputs.app_version != ''}}
runs-on: ubuntu-latest
strategy:
matrix:
architectures: ${{ fromJson(needs.init.outputs.architectures) }}
architectures: ${{fromJson(needs.init.outputs.architectures)}}
steps:
- name: Check submitted version
id: version-check
Expand All @@ -78,10 +78,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == "true"
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true'}}

- name: Install required tools
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == "true"
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true'}}
run: |
sudo apt-get update -y
sudo apt-get install -y debootstrap squashfs-tools wget unzip python3 python3-pip
Expand All @@ -95,12 +95,12 @@ jobs:
sudo -v ; wget -q https://kcl-lang.io/script/install-cli.sh -O - | sudo bash
- name: Create Distrobuilder LXC template file
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == "true"
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true'}}
run: |
kcl run ${{github.workspace}}/__layout.k -D input=${{github.workspace}}/${{inputs.config_path}} -o /tmp/${{needs.init.outputs.app_name}}.build
- name: Build Image
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == "true"
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true'}}
run: |
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}}/
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
Expand All @@ -109,7 +109,7 @@ jobs:
pwd && ls -lash
- name: Publish Image files
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == "true" && ${{steps.validity-checks.outputs.IS_PUBLISHABLE}} == "true"
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true' && steps.validity-checks.outputs.IS_PUBLISHABLE == 'true'}}
run: |
cat << EOF > /tmp/rclone.conf
$RCLONE_CONFIG
Expand All @@ -124,7 +124,7 @@ jobs:
RCLONE_CONFIG_PASS: ${{secrets.RCLONE_CONFIG_PASS}}

- name: Publish Image metadata
if: ${{steps.validity-checks.outputs.IS_BUILDABLE}} == "true" && ${{steps.validity-checks.outputs.IS_PUBLISHABLE}} == "true"
if: ${{steps.validity-checks.outputs.IS_BUILDABLE == 'true' && steps.validity-checks.outputs.IS_PUBLISHABLE == 'true'}}
run: |
CATEGORIES_STR="${{needs.init.outputs.categories}}"
CATEGORIES_FMT=$(echo "[\"$CATEGORIES_STR\"]" | sed -E 's/^\["[ ,]+/["/g' | sed -E 's/[ ,]+"]$/"]/g' | sed -E 's/ *, */","/g')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: tj-actions/changed-files@v45
with:
files: templates/**
if: ${{github.event_name}} == 'pull_request'
if: ${{github.event_name == 'pull_request'}}

- name: List all templates
id: all-templates-list
Expand Down

0 comments on commit 868f43e

Please sign in to comment.