Skip to content

Commit

Permalink
add CD for all branches
Browse files Browse the repository at this point in the history
  • Loading branch information
axherrm committed Dec 8, 2023
1 parent f29a614 commit 62744d2
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
- 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:
Expand All @@ -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.
Expand Down

0 comments on commit 62744d2

Please sign in to comment.