mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-21 21:09:42 +00:00
cargo lock policies
This commit is contained in:
parent
559bd705ab
commit
f1e352946d
25
.github/workflows/cargo-lock.yml
vendored
Normal file
25
.github/workflows/cargo-lock.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Remove Cargo.lock changes
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
- 'Cargo.lock'
|
||||
|
||||
jobs:
|
||||
remove-cargo-lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Remove Cargo.lock changes
|
||||
run: |
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
git checkout ${{ github.head_ref }}
|
||||
git reset origin/${{ github.base_ref }} -- Cargo.lock
|
||||
git commit -m "Remove changes to Cargo.lock" || echo "No changes to commit"
|
||||
git push origin ${{ github.head_ref }} --force
|
5
cargo-lock-merge.txt
Normal file
5
cargo-lock-merge.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
What to do when you have a Cargo.lock merge conflict?
|
||||
1. `git checkout origin/main -- Cargo.lock` to get the original Cargo.lock
|
||||
2. `cargo build` to update Cargo.lock
|
||||
3. `git add Cargo.lock`
|
||||
4. continue the merge as normal
|
Loading…
Reference in New Issue
Block a user