Skip to content

Commit 1371c91

Browse files
authored
Remove commit and push step of actions (#686)
We need to work out how users should consume these binaries, but for now this reliably fails so let's stop doing it. Instead, `cat` out what the the contents of the generated file _would_ be, for easy copy and paste by people working on the rules.
1 parent 81abea6 commit 1371c91

File tree

1 file changed

+2
-33
lines changed

1 file changed

+2
-33
lines changed

.github/workflows/crate_universe.yaml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -176,38 +176,7 @@ jobs:
176176
sha256="$(shasum --algorithm 256 ${{ github.workspace }}/crate_universe/private/bootstrap/bin/${triple}/release/${bin_name} | awk '{ print $1 }')"
177177
sed -i "s|{${triple}--sha256}|${sha256}|" ${{ github.workspace }}/crate_universe/private/defaults.bzl
178178
done
179+
echo "Generated crate_universe/private/defaults.bzl file:"
180+
cat ${{ github.workspace }}/crate_universe/private/defaults.bzl
179181
env:
180182
URL: ${{ steps.crate_universe_release.outputs.html_url }}
181-
- run: |
182-
# Commit and push changes back to the repo
183-
if [[ -z "$(git status --porcelain)" ]]; then
184-
echo "No change to any binaries"
185-
exit 0
186-
fi
187-
188-
git stage ${GITHUB_WORKSPACE}/crate_universe/private/defaults.bzl && git status
189-
190-
# Setup git and commit back to the repo
191-
git config user.email "[email protected]"
192-
git config user.name "github-actions"
193-
194-
# Cache the current info
195-
commit="$(git rev-parse HEAD)"
196-
branch="$(git branch --show-current)"
197-
198-
# commit the change
199-
git commit -m "github-actions: update crate_universe binaries from ${commit}"
200-
201-
# Attempt to push but compensate for potential issues where another PR would
202-
# have been merged before this pipeline gets to this point.
203-
for i in 1 2 3 4 5 ; do
204-
{
205-
git push origin "${branch}" && exit 0
206-
} || {
207-
sleep 10
208-
git pull --rebase
209-
}
210-
done
211-
212-
echo "Failed to push commit to to repo"
213-
exit 1

0 commit comments

Comments
 (0)