Skip to content

Commit

Permalink
Fix syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 committed Mar 21, 2024
1 parent 0d525dc commit 544a2c5
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 48 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ on:
default: "0"
upload:
description: "Upload ?"
type: bool
type: boolean
default: false
is_release:
description: "Upload ?"
type: bool
type: boolean
default: false
distribution:
description: "[ 'tar', 'rpm', 'deb', 'docker' ]"
description: '[ "tar", "rpm", "deb", "docker" ]'
type: string
default: "[ 'rpm', 'deb' ]"
default: '[ "rpm", "deb" ]'
architecture:
description: "[ 'x64', 'arm64' ]"
description: '[ "x64", "arm64" ]'
type: string
default: "[ 'x64' ]"
default: '[ "x64" ]'

# ==========================
# Bibliography
Expand All @@ -44,15 +44,25 @@ on:
# | https://docs.github.com/en/actions/learn-github-actions/expressions#example

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
steps:
- id: setup
run: |
matrix=$(jq -cn \
--argjson distribution ${{ inputs.distribution }} \
--argjson architecture ${{ inputs.architecture }} \
'{distribution: $distribution, architecture: $architecture}'
)
echo "$matrix" >> $GITHUB_OUTPUT
build:
needs: [matrix]
strategy:
matrix:
distribution: ${{ inputs.distribution }}
architecture: ${{ inputs.architecture }}
exclude:
# skip arm64 until we have arm runners
- architecture: arm64
fail-fast: false
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
uses: ./.github/workflows/r_build.yml
with:
revision: ${{ github.event_name == 'push' && '0' || inputs.revision }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r_assemble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
default: "0"
is_release:
description: "Uses release's nomenclature"
type: bool
type: boolean
default: false
distribution:
description: One of "[ 'tar', 'rpm', 'deb', 'docker' ]"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/r_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:
default: "0"
upload:
description: "Uploads artifacts"
type: bool
type: boolean
default: false
is_release:
description: "Uses release's nomenclature"
type: bool
type: boolean
default: false
distribution:
description: One of "[ 'tar', 'rpm', 'deb', 'docker' ]"
Expand All @@ -35,15 +35,15 @@ jobs:
architecture: ${{ matrix.architecture }}

assemble:
needs: [build]
needs: [ build_min ]
uses: ./.github/workflows/r_assemble.yml
with:
revision: ${{ inputs.revision }}
distribution: ${{ matrix.distribution }}
architecture: ${{ matrix.architecture }}

test:
needs: [assemble]
needs: [ assemble ]
uses: ./.github/workflows/r_test.yml
with:
revision: ${{ inputs.revision }}
Expand All @@ -52,7 +52,7 @@ jobs:

upload:
if: ${{ inputs.upload }}
needs: [test]
needs: [ test ]
uses: ./.github/workflows/r_upload.yml
with:
revision: ${{ inputs.revision }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r_build_min.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
default: "0"
is_release:
description: "Uses release's nomenclature"
type: bool
type: boolean
default: false
distribution:
description: One of "[ 'tar', 'rpm', 'deb', 'docker' ]"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/r_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
default: "0"
is_release:
description: "Uses release's nomenclature"
type: bool
type: boolean
default: false
distribution:
description: One of "[ 'tar', 'rpm', 'deb', 'docker' ]"
Expand All @@ -25,6 +25,7 @@ on:
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run `baptizer.sh` (min)
run: |
Expand All @@ -36,8 +37,8 @@ jobs:
)
echo "$name" >> $GITHUB_OUTPUT
id: package
outputs:
package_name: ${{ steps.package.outputs.name }}
outputs:
package_name: ${{ steps.package.outputs.name }}

r_test_rpm:
if: ${{ inputs.distribution == 'rpm' }}
Expand Down
51 changes: 26 additions & 25 deletions .github/workflows/r_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ name: Upload (reusable)
# - Run from another workflow
on:
workflow_call:
revision:
description: "Revision number"
type: string
default: "0"
is_release:
description: "Uses release's nomenclature"
type: bool
default: false
distribution:
description: One of "[ 'tar', 'rpm', 'deb', 'docker' ]"
type: string
required: true
architecture:
description: One of "[ 'x64', 'arm64' ]"
type: string
required: true
inputs:
revision:
description: "Revision number"
type: string
default: "0"
is_release:
description: "Uses release's nomenclature"
type: boolean
default: false
distribution:
description: One of "[ 'tar', 'rpm', 'deb', 'docker' ]"
type: string
required: true
architecture:
description: One of "[ 'x64', 'arm64' ]"
type: string
required: true
secrets:
CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY:
required: true
Expand All @@ -36,15 +37,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run `baptizer.sh`
run: |
name=$(bash scripts/baptizer.sh \
${{ inputs.is_release && '-x' }} \
-a ${{ inputs.architecture }} \
-d ${{ inputs.distribution }} \
-r ${{ inputs.revision }} \
)
echo "$name" >> $GITHUB_OUTPUT
id: package
run: |
name=$(bash scripts/baptizer.sh \
${{ inputs.is_release && '-x' }} \
-a ${{ inputs.architecture }} \
-d ${{ inputs.distribution }} \
-r ${{ inputs.revision }} \
)
echo "$name" >> $GITHUB_OUTPUT
id: package

- name: Download artifact
uses: actions/download-artifact@v4
Expand Down

0 comments on commit 544a2c5

Please sign in to comment.