-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename build-darwin.yml to linux-amd64.yml
- Loading branch information
Showing
2 changed files
with
57 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
L1_NETWORK_NAME: testnet | ||
MOVEVM_VERSION: v0.2.12 | ||
|
||
jobs: | ||
build-linux-amd64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- name: Build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: .github/workflows/Dockerfile.linux.amd64 | ||
load: true | ||
tags: initia:linux-amd64 | ||
- name: Export binary | ||
run: | | ||
docker create --name temp initia:linux-amd64 | ||
docker cp temp:/app ./app | ||
tar -czvf initia_${{ github.sha }}_Linux_amd64.tar.gz -C app . | ||
docker rm temp | ||
- name: Google Auth | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: '${{ secrets.GCP_SA_KEY }}' | ||
|
||
- name: Set up Cloud SDK | ||
uses: 'google-github-actions/setup-gcloud@v2' | ||
|
||
- name: Upload to GCS | ||
env: | ||
GCS_BUCKET: ${{ secrets.GCS_BUCKET }} | ||
run: | | ||
gsutil cp initia_${{ github.sha }}_Linux_amd64.tar.gz gs://${GCS_BUCKET}/networks/testnet/binaries/ | ||
- name: Verify upload and Generate public URL | ||
env: | ||
GCS_BUCKET: ${{ secrets.GCS_BUCKET }} | ||
run: | | ||
if gsutil stat gs://${GCS_BUCKET}/networks/testnet/binaries/initia_${{ github.sha }}_Linux_amd64.tar.gz; then | ||
echo "File successfully uploaded" | ||
echo "Public URL: https://storage.googleapis.com/${GCS_BUCKET}/networks/testnet/binaries/initia_${{ github.sha }}_Linux_amd64.tar.gz" >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "File upload failed" | ||
exit 1 | ||
fi |