-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a58c5a8
commit 6ae6997
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,30 +6,49 @@ on: | |
name: release-please-update-cargo-lock | ||
jobs: | ||
update_cargo_lock: | ||
runs-on: [matterlabs-default-infra-runners] | ||
runs-on: [matterlabs-ci-runner] | ||
|
||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
submodules: "recursive" | ||
persist-credentials: false | ||
|
||
- name: Check last commit | ||
id: condition | ||
run: | | ||
COMMIT=$(git log -1 --pretty=%B) | ||
if [[ "$COMMIT" == "Update Cargo.lock" ]]; then | ||
echo "Cargo.lock is already updated" | ||
echo "::set-output name=skip_steps::true" | ||
else | ||
echo "Cargo.lock should be updated" | ||
echo "::set-output name=skip_steps::false" | ||
fi | ||
- name: Setup environment | ||
if: steps.condition.outputs.skip_steps != 'true' | ||
run: | | ||
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV | ||
echo $(pwd)/bin >> $GITHUB_PATH | ||
echo IN_DOCKER=1 >> .env | ||
- name: Start services | ||
run: | | ||
docker compose up -d zk | ||
if: steps.condition.outputs.skip_steps != 'true' | ||
run: docker compose up -d zk | ||
|
||
- name: Cargo check | ||
if: steps.condition.outputs.skip_steps != 'true' | ||
run: ci_run cargo check | ||
|
||
- name: Push changes | ||
if: steps.condition.outputs.skip_steps != 'true' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "zksync-era-bot" | ||
git remote set-url origin 'https://${{ secrets.RELEASE_TOKEN }}@github.com/matter-labs/zksync-era.git' | ||
git add ./Cargo.lock | ||
git commit -m "Update Cargo.lock" | ||
git push |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.