-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove mysten-tap sui.rb update (#19861)
## Description Remove mysten-tap sui.rb update ## Test plan 👀
- Loading branch information
Showing
1 changed file
with
0 additions
and
75 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 |
---|---|---|
|
@@ -242,81 +242,6 @@ jobs: | |
# https://github.com/settings/tokens/new?scopes=public_repo,workflow | ||
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GH_FORMULA_BUMP }} | ||
|
||
update-homebrew-tap: | ||
name: Update mysten-tap sui.rb file | ||
needs: release-build | ||
runs-on: ubuntu-latest | ||
if: ${{ contains( inputs.sui_tag, 'testnet') || contains( github.ref, 'testnet') }} | ||
steps: | ||
- name: Clean up tag name ${{ env.TAG_NAME }} | ||
shell: bash | ||
run: | | ||
echo "sui_tag=$(echo ${{ env.TAG_NAME }} | sed s/'refs\/tags\/'//)" >> $GITHUB_ENV | ||
# Checkout MystenLabs/homebrew-tap | ||
- name: Checkout Target Repository | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 | ||
with: | ||
repository: MystenLabs/homebrew-tap | ||
# @john's PAT, needs to be rotated jan 5 2025 | ||
token: ${{ secrets.HOMEBREW_TAP_REPO_READ_WRITE }} | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
# Download all artifacts from the previous job | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # pin@v2 | ||
|
||
- name: Fetch Ubuntu x86_64 Binary and Compute SHA256 | ||
shell: bash | ||
run: | | ||
echo "sha256_ubuntu_release=$(sha256sum sui-binaries-ubuntu-ghcloud/sui-${{ env.sui_tag }}-ubuntu-x86_64.tgz | awk '{print $1}')" >> $GITHUB_ENV | ||
echo "sha256_macos_x86_release=$(sha256sum sui-binaries-macos-latest-xl/sui-${{ env.sui_tag }}-macos-x86_64.tgz | awk '{print $1}')" >> $GITHUB_ENV | ||
echo "sha256_macos_arm_release=$(sha256sum sui-binaries-macos-latest-xlarge/sui-${{ env.sui_tag }}-macos-arm64.tgz | awk '{print $1}' )" >> $GITHUB_ENV | ||
# Install Jinja2 for templating | ||
- name: Install Jinja2 | ||
run: pip install jinja2 | ||
|
||
- name: Apply Jinja2 Template and Update Formula | ||
run: | | ||
python3 - <<EOF | ||
import jinja2 | ||
import os | ||
# Load the template | ||
template_loader = jinja2.FileSystemLoader(searchpath="./template") | ||
template_env = jinja2.Environment(loader=template_loader) | ||
template = template_env.get_template("sui.rb.j2") | ||
version = "${{ env.sui_tag }}".removeprefix("testnet-v") | ||
# Render the template with variables | ||
output = template.render( | ||
version=version, | ||
linux_sha256="${sha256_ubuntu_release}", | ||
macos_intel_sha256="${sha256_macos_x86_release}", | ||
macos_arm_sha256="${sha256_macos_arm_release}" | ||
) | ||
# Write the output to the formula file | ||
with open("Formula/sui.rb", "w") as file: | ||
file.write(output) | ||
EOF | ||
# Commit and Push to Target Repository | ||
- name: Commit and Push to Target Repository | ||
uses: github-actions-x/commit@722d56b8968bf00ced78407bbe2ead81062d8baa # [email protected] | ||
with: | ||
github-token: ${{ secrets.HOMEBREW_TAP_REPO_READ_WRITE }} | ||
commit-message: "Update Homebrew formula for release ${{ env.sui_tag }}" | ||
files: Formula/sui.rb | ||
push-branch: main | ||
rebase: 'true' | ||
force-add: 'true' | ||
name: ${{ github.triggering_actor }} | ||
email: ${{ github.triggering_actor }}@users.noreply.github.com | ||
|
||
# Tag all sui images with release tag, so that they can be easily found | ||
tag-docker-hub-images: | ||
runs-on: ubuntu-latest | ||
|