diff --git a/.github/actions/update-workspace-dependencies/action.yaml b/.github/actions/update-workspace-dependencies/action.yaml index 5f33fba5a..700e07044 100644 --- a/.github/actions/update-workspace-dependencies/action.yaml +++ b/.github/actions/update-workspace-dependencies/action.yaml @@ -18,5 +18,8 @@ runs: shell: bash run: | chmod +x ${{ github.action_path }}/update-workspace-dependencies.sh - ${{ github.action_path }}/update-workspace-dependencies.sh "${{ github.repository }}" "wsl-pro-service" - + ${{ github.action_path }}/update-workspace-dependencies.sh "${{ github.repository }}" "${{ inputs.module }}" + - name: Update module + shell: bash + working-directory: ${{ inputs.module }} + run: go mod tidy diff --git a/.github/workflows/auto-updates.yaml b/.github/workflows/auto-updates.yaml index a2a3b3703..c991fba39 100644 --- a/.github/workflows/auto-updates.yaml +++ b/.github/workflows/auto-updates.yaml @@ -143,19 +143,17 @@ jobs: uses: ./.github/actions/update-workspace-dependencies with: module: wsl-pro-service - - name: Detect modifications - shell: bash + - name: Detect changes id: check-diff - run: | - hasModif="false" - MODIFIED=$(git status --porcelain --untracked-files=no) - if [ -n "$MODIFIED" ]; then - hasModif="true" - fi - echo "modified=${hasModif}" >> $GITHUB_OUTPUT + uses: canonical/desktop-engineering/gh-actions/common/has-diff@main + with: + working-directory: wsl-pro-service + # Go workspace checksum files tend to update when no one is asking + paths-to-ignore: 'go.work.sum' + fail-on-diff: false - name: Create Pull Request uses: peter-evans/create-pull-request@v5 - if: steps.check-diff.outputs.modified == 'true' + if: steps.check-diff.outputs.diff == 'true' with: commit-message: Auto update internal dependencies title: 'deps(wsl-pro-service): Auto update WSL-Pro-Service dependencies' @@ -164,6 +162,6 @@ jobs: branch: auto-updates/update-internal-dependencies token: ${{ secrets.GITHUB_TOKEN }} - name: Push branch - if: steps.check-diff.outputs.modified == 'true' + if: steps.check-diff.outputs.diff == 'true' run: | git push origin auto-updates/update-internal-dependencies:main