Skip to content

Commit

Permalink
ci: reuse devscripts/prepare-release to avoid code duplication
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Salvador <[email protected]>
  • Loading branch information
otavio committed Feb 25, 2023
1 parent fc3a8fe commit 251e3ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/dependabot_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,9 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Update go.sum
- name: Run prepare-release script to update Go modules
run: |
# Run go mod tidy for every sub-project
for i in $(seq 1 5); do
for dir in cli api agent ssh; do
(cd $dir && go mod tidy)
done
done
# Run go mod tidy for root project
go mod tidy
./devscripts/prepare-release
- name: Create diff artifact
run: |
git diff > /tmp/diff
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
if: matrix.project != 'ui' && github.event.pull_request.draft == false
working-directory: ${{ matrix.project }}
run: |
go mod tidy
./devscripts/prepare-release
if [ -n "$(git status --porcelain)" ]; then
echo "Missing dependencies on 'go.mod'"
exit 1
Expand Down
2 changes: 2 additions & 0 deletions devscripts/prepare-release
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ echo "Running Go related tasks"
for d in $go_dirs; do
prepare_go_dir $d
done

prepare_go_dir .

0 comments on commit 251e3ee

Please sign in to comment.