Skip to content

Commit 11c2c2c

Browse files
author
mafyuh
committedJul 24, 2024
Update .forgejo/workflows/CD.yml
1 parent 31ae897 commit 11c2c2c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
 

‎.forgejo/workflows/CD.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fi
2323
folders=$(git diff --name-only HEAD~1 HEAD | grep '^docker/' | cut -d/ -f2 | sort | uniq)
2424
echo "Modified folders: $folders"
25-
echo "::set-output name=folders::$folders"
25+
echo "::set-output name=folders::$folders"
2626
2727
- name: Set condition for deployment
2828
id: set-condition
@@ -35,14 +35,17 @@ jobs:
3535
echo "::set-output name=continue::true"
3636
fi
3737
38-
if: steps.set-condition.outputs.continue == 'true'
38+
conditional-deploy:
39+
if: needs.deploy.outputs.continue == 'true'
40+
runs-on: ubuntu-22.04
41+
needs: deploy
3942
steps:
4043
- name: Checkout repository
4144
uses: actions/checkout@v4
4245

4346
- name: Deploy to hosts
4447
run: |
45-
IFS=' ' read -r -a folder_array <<< "${{ steps.detect-changes.outputs.folders }}"
48+
IFS=' ' read -r -a folder_array <<< "${{ needs.deploy.outputs.folders }}"
4649
for folder in "${folder_array[@]}"; do
4750
case $folder in
4851
arrs)
@@ -110,4 +113,4 @@ jobs:
110113
echo "Absolute End: $(echo "$logs" | jq -r '.range.absolute_end')"
111114
echo "Content:"
112115
echo "$(echo "$logs" | jq -r '.content')"
113-
done
116+
done

0 commit comments

Comments
 (0)
Please sign in to comment.