Skip to content

Commit

Permalink
Squash merge sync-lockfile prs, provide zenoh HEAD hash & date (#876)
Browse files Browse the repository at this point in the history
* ci: Squash merge sync-lockfile prs, provide zenoh HEAD hash & date

* fix: Add # before pull request number

* fix: Set zenoh HEAD info in title
  • Loading branch information
fuzzypixelz authored Mar 29, 2024
1 parent 888d340 commit 12584fa
Showing 1 changed file with 22 additions and 3 deletions.
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 }}

0 comments on commit 12584fa

Please sign in to comment.