diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index 2f017d4..f64ac7a 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -21,25 +21,20 @@ jobs: runs-on: ubuntu-latest outputs: branches: ${{ steps.generate-matrix.outputs.branches }} -# versions: ${{ steps.generate-matrix.outputs.versions }} steps: - uses: actions/checkout@v4 -# with: -# fetch-depth: 0 + with: + fetch-depth: 0 + - name: 'Setup jq' + uses: dcarbone/install-jq-action@v2.1.0 - name: Generate Matrix id: generate-matrix run: | - apt-get update - apt-get install -y jq - branches=($(git branch | cut -c 3-)) + branches=($(git branch -r | cut -c 3- | sed 's/origin\///g')) json_branches=$(printf '%s\n' "${branches[@]}" | jq -R . | jq -s -c .) -# json_branches=$(toJSON "${branches[@]}") - echo ::set-output name=branches::${json_branches} - # SERVICES='${{ toJSON(github.event.client_payload.services) }}' -# echo ::set-output name=services::${SERVICES} -# VERSIONS='${{ toJSON(github.event.client_payload.versions) }}' -# echo ::set-output name=versions::${VERSIONS} - # ------------------------ + echo "branches=${json_branches}" >> $GITHUB_OUTPUT +# echo ::set-output name=branches::${json_branches} + my_echo: runs-on: ubuntu-latest needs: @@ -60,8 +55,6 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} - # with: -# fetch-depth: 0 - uses: actions/setup-node@v4 with: # Version Spec of the version to use in SemVer notation.