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

Squash merge sync-lockfile prs, provide zenoh HEAD hash & date #876

Merged
merged 3 commits into from
Mar 29, 2024
Merged
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
25 changes: 22 additions & 3 deletions .github/workflows/sync-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@ jobs:
fetch:
name: Fetch Zenoh's lockfile
runs-on: ubuntu-latest
outputs:
zenoh-head-hash: ${{ steps.info.outputs.head-hash }}
zenoh-head-date: ${{ steps.info.outputs.head-date }}
steps:
- name: Checkout Zenoh
uses: actions/checkout@v4
with:
repository: eclipse-zenoh/zenoh
ref: ${{ inputs.branch }}

- id: info
name: Get HEAD info
run: |
echo "head-hash=$(git log -1 --format=%h)" >> $GITHUB_OUTPUT
echo "head-date=$(git log -1 --format=%ad)" >> $GITHUB_OUTPUT

- name: Upload lockfile
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -94,8 +103,14 @@ jobs:
# NOTE: If there is a pending PR, this action will simply update it with a forced push.
uses: peter-evans/create-pull-request@v6
with:
title: Sync lockfile with Zenoh's
body: Automated synchronization of the Cargo lockfile with Zenoh. This is done to ensure plugin ABI compatibility.
title: Sync `Cargo.lock` with `eclipse-zenoh/zenoh@${{ needs.fetch.outputs.zenoh-head-hash }}` from `${{ needs.fetch.outputs.zenoh-head-date }}`"
body: >
This pull request synchronizes ${{ matrix.dependant }}'s Cargo lockfile with zenoh's.
This is done to ensure ABI compatibility between Zenoh applications, backends & plugins.

- **Zenoh HEAD hash**: eclipse-zenoh/zenoh@${{ needs.fetch.outputs.zenoh-head-hash }}
- **Zenoh HEAD date**: ${{ needs.fetch.outputs.zenoh-head-date }}
- **Workflow run**: [${{ github.run_id }}](https://github.com/eclipse-zenoh/zenoh/actions/runs/${{ github.run_id }})
commit-message: "chore: Sync Cargo lockfile with Zenoh's"
committer: eclipse-zenoh-bot <[email protected]>
author: eclipse-zenoh-bot <[email protected]>
Expand All @@ -107,6 +122,10 @@ jobs:

- name: Enable auto merge for the pull request
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge -R "eclipse-zenoh/${{ matrix.dependant }}" --merge --auto "${{ steps.cpr.outputs.pull-request-number }}"
run: >
gh pr merge "${{ steps.cpr.outputs.pull-request-number }}"
--repo "eclipse-zenoh/${{ matrix.dependant }}"
--squash
--auto
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN_WORKFLOW }}
Loading