Skip to content

Commit

Permalink
ci(sdk): Fix workflow [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
julienloizelet committed Nov 2, 2024
1 parent 6181ceb commit 64390ed
Showing 1 changed file with 21 additions and 41 deletions.
62 changes: 21 additions & 41 deletions .github/workflows/php-sdk-development-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,68 +85,48 @@ jobs:
steps:

- name: Set PHP common variables
if: inputs.is_call != true
id: set-common-data
run: |
echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/crowdsecurity/php-common/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "repo=${{ fromJson(env.PHP_COMMON_JSON)[1] }}" >> $GITHUB_OUTPUT
echo "branch=${{ fromJson(env.PHP_COMMON_JSON)[0] }}" >> $GITHUB_OUTPUT
- name: Set PHP common variables
if: inputs.is_call == true
id: set-common-data
run: |
echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/crowdsecurity/php-common/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "repo=crowdsecurity/php-common" >> $GITHUB_OUTPUT
echo "branch=${{ fromJson(env.PHP_COMMON_JSON)[0] }}" >> $GITHUB_OUTPUT
- name: Set LAPI client variables
if: inputs.is_call != true
id: set-lapi-client-data
run: |
echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/crowdsecurity/php-lapi-client/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "repo=${{ fromJson(env.LAPI_CLIENT_JSON)[1] }}" >> $GITHUB_OUTPUT
echo "branch=${{ fromJson(env.LAPI_CLIENT_JSON)[0] }}" >> $GITHUB_OUTPUT
if [ "${{ inputs.is_call }}" = "true" ]; then
echo "repo=crowdsecurity/php-common" >> $GITHUB_OUTPUT
else
echo "repo=${{ fromJson(env.PHP_COMMON_JSON)[1] }}" >> $GITHUB_OUTPUT
fi
- name: Set LAPI client variables
if: inputs.is_call == true
id: set-lapi-client-data
run: |
echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/crowdsecurity/php-lapi-client/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "repo=crowdsecurity/php-lapi-client" >> $GITHUB_OUTPUT
echo "branch=${{ fromJson(env.LAPI_CLIENT_JSON)[0] }}" >> $GITHUB_OUTPUT
if [ "${{ inputs.is_call }}" = "true" ]; then
echo "repo=crowdsecurity/php-lapi-client" >> $GITHUB_OUTPUT
else
echo "repo=${{ fromJson(env.LAPI_CLIENT_JSON)[1] }}" >> $GITHUB_OUTPUT
fi
- name: Set Remediation engine variables
if: inputs.is_call != true
id: set-remediation-engine-data
run: |
echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/crowdsecurity/php-remediation-engine/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "repo=${{ fromJson(env.REMEDIATION_ENGINE_JSON)[1] }}" >> $GITHUB_OUTPUT
echo "branch=${{ fromJson(env.REMEDIATION_ENGINE_JSON)[0] }}" >> $GITHUB_OUTPUT
- name: Set Remediation engine variables
if: inputs.is_call == true
id: set-remediation-engine-data
run: |
echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/crowdsecurity/php-remediation-engine/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "repo=crowdsecurity/php-remediation-engine" >> $GITHUB_OUTPUT
echo "branch=${{ fromJson(env.REMEDIATION_ENGINE_JSON)[0] }}" >> $GITHUB_OUTPUT
if [ "${{ inputs.is_call }}" = "true" ]; then
echo "repo=crowdsecurity/php-remediation-engine" >> $GITHUB_OUTPUT
else
echo "repo=${{ fromJson(env.REMEDIATION_ENGINE_JSON)[1] }}" >> $GITHUB_OUTPUT
fi
- name: Set Bouncer library variables
if: inputs.is_call != true
id: set-bouncer-lib-data
run: |
echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/crowdsecurity/php-cs-bouncer/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "repo=${{ fromJson(env.BOUNCER_LIB_JSON)[1] }}" >> $GITHUB_OUTPUT
echo "branch=${{ fromJson(env.BOUNCER_LIB_JSON)[0] }}" >> $GITHUB_OUTPUT
- name: Set Bouncer library variables
if: inputs.is_call == true
id: set-bouncer-lib-data
run: |
echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/crowdsecurity/php-cs-bouncer/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "repo=crowdsecurity/php-cs-bouncer" >> $GITHUB_OUTPUT
echo "branch=${{ fromJson(env.BOUNCER_LIB_JSON)[0] }}" >> $GITHUB_OUTPUT
if [ "${{ inputs.is_call }}" = "true" ]; then
echo "repo=crowdsecurity/php-cs-bouncer" >> $GITHUB_OUTPUT
else
echo "repo=${{ fromJson(env.BOUNCER_LIB_JSON)[1] }}" >> $GITHUB_OUTPUT
fi
- name: Install DDEV
# @see https://ddev.readthedocs.io/en/stable/#installationupgrade-script-linux-and-macos-armarm64-and-amd64-architectures
Expand Down

0 comments on commit 64390ed

Please sign in to comment.