Skip to content

Commit

Permalink
more fixes for workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Amateur-God committed Jun 27, 2024
1 parent 7c409b2 commit 0101f8f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/addon-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ jobs:
name: Discover Add-ons
runs-on: ubuntu-latest
outputs:
folders: ${{ steps.folders.outputs.addon_dirs }}
addon_dirs: ${{ steps.folders.outputs.addon_dirs }}
steps:
- name: Checkout code from GitHub
uses: actions/checkout@v2
- name: Find add-on directories
id: folders
run: |
ADDON_DIRS=$(find addons -mindepth 1 -maxdepth 1 -type d | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "addon_dirs=$ADDON_DIRS" >> $GITHUB_ENV
echo "::set-output name=addon_dirs::$ADDON_DIRS"
- name: Debug - List directories
run: |
echo "Found add-on directories:"
echo "${{ env.addon_dirs }}"
echo "${{ steps.folders.outputs.addon_dirs }}"
information:
name: Gather add-on information
needs: discover
runs-on: ubuntu-latest
strategy:
matrix:
folder: ${{ fromJson(env.addon_dirs) }}
folder: ${{ fromJson(needs.discover.outputs.addon_dirs) }}
outputs:
architectures: ${{ steps.information.outputs.architectures }}
build: ${{ steps.information.outputs.build }}
Expand All @@ -59,15 +59,15 @@ jobs:
if [[ ! -z "${{ inputs.slug }}" ]]; then
slug="${{ inputs.slug }}"
fi
echo "slug=$slug" >> $GITHUB_ENV
echo "slug=$slug" >> "$GITHUB_OUTPUT"
lint:
name: Lint Add-on
needs: information
runs-on: ubuntu-latest
strategy:
matrix:
folder: ${{ fromJson(env.addon_dirs) }}
folder: ${{ fromJson(needs.discover.outputs.addon_dirs) }}
steps:
- name: Checkout code from GitHub
uses: actions/checkout@v2
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
folder: ${{ fromJson(env.addon_dirs) }}
folder: ${{ fromJson(needs.discover.outputs.addon_dirs) }}
architecture: [amd64, armhf, armv7, aarch64, i386]
steps:
- name: Checkout code from GitHub
Expand All @@ -123,19 +123,19 @@ jobs:
- name: Compose build flags
id: flags
run: |
echo "date=$(date +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
echo "date=$(date +"%Y-%m-%dT%H:%M:%SZ")" >> "$GITHUB_ENV"
from=$(yq --no-colors eval ".build_from.${{ matrix.architecture }}" "${{ matrix.folder }}/config.json")
echo "from=${from}" >> $GITHUB_ENV
echo "from=${from}" >> "$GITHUB_ENV"
if [[ "${{ matrix.architecture}}" = "amd64" ]]; then
echo "platform=linux/amd64" >> $GITHUB_ENV
echo "platform=linux/amd64" >> "$GITHUB_ENV"
elif [[ "${{ matrix.architecture }}" = "i386" ]]; then
echo "platform=linux/386" >> $GITHUB_ENV
echo "platform=linux/386" >> "$GITHUB_ENV"
elif [[ "${{ matrix.architecture }}" = "armhf" ]]; then
echo "platform=linux/arm/v6" >> $GITHUB_ENV
echo "platform=linux/arm/v6" >> "$GITHUB_ENV"
elif [[ "${{ matrix.architecture }}" = "armv7" ]]; then
echo "platform=linux/arm/v7" >> $GITHUB_ENV
echo "platform=linux/arm/v7" >> "$GITHUB_ENV"
elif [[ "${{ matrix.architecture }}" = "aarch64" ]]; then
echo "platform=linux/arm64/v8" >> $GITHUB_ENV
echo "platform=linux/arm64/v8" >> "$GITHUB_ENV"
else
echo "::error ::Could not determine platform for architecture ${{ matrix.architecture }}"
exit 1
Expand Down

0 comments on commit 0101f8f

Please sign in to comment.