Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix auto-update wsl-pro-service not mod-tidying #413

Merged
merged 5 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/actions/update-workspace-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 9 additions & 11 deletions .github/workflows/auto-updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
2 changes: 0 additions & 2 deletions wsl-pro-service/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231113084350-57c6acdb2d5b h1:RvQ13IIoGm/JsPQYZA7hOvjX0rWIDqLH4DKXq6SW+L0=
github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231113084350-57c6acdb2d5b/go.mod h1:btQ/eVeGFXdXdifpHRo4V05VmmnhyhWWkecmVnvUbfQ=
github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231120095032-972ad3e1f0c4 h1:dm4fQMsklc51D+7N9qYoB6QbbMmubexTj//En/IQIO8=
github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231120095032-972ad3e1f0c4/go.mod h1:btQ/eVeGFXdXdifpHRo4V05VmmnhyhWWkecmVnvUbfQ=
github.com/canonical/ubuntu-pro-for-windows/common v0.0.0-20231113084350-57c6acdb2d5b h1:e/2jgQO5wxcvIJBqQwD+hw40H0ytJAFRdOhnV+lQkUU=
Expand Down
Loading