-
Notifications
You must be signed in to change notification settings - Fork 0
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
ccdc99c
commit afb5844
Showing
4 changed files
with
63 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Setup Aptos CLI | ||
inputs: | ||
version: | ||
require: true | ||
private-key: | ||
require: false | ||
default: "" | ||
public-key: | ||
require: false | ||
default: "" | ||
address: | ||
require: false | ||
default: "" | ||
rpc-url: | ||
require: false | ||
default: "https://fullnode.testnet.aptoslabs.com" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download Aptos CLI | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: "aptos-labs/aptos-core" | ||
tag: aptos-cli-v${{ inputs.version }} | ||
fileName: aptos-cli-${{ inputs.version }}-Ubuntu-x86_64.zip | ||
- name: Setup Aptos CLI | ||
shell: bash | ||
run: | | ||
unzip aptos-cli-${{ inputs.version }}-Ubuntu-x86_64.zip | ||
mv ./aptos /usr/local/bin | ||
chmod +x /usr/local/bin/aptos | ||
- name: Setup Aptos Client | ||
shell: bash | ||
if: ${{ inputs.private-key != '' && inputs.public-key != '' && inputs.address != '' }} | ||
run: | | ||
set -e -o pipefail | ||
APTOS_CONFIG_DIR="./.aptos/" | ||
mkdir -p "${APTOS_CONFIG_DIR}" | ||
export APTOS_CONFIG_PATH="${APTOS_CONFIG_DIR}/config.yaml" | ||
export APTOS_REST_URL="${{ inputs.rpc-url }}" | ||
export APTOS_PRIVATE_KEY="${{ inputs.private-key }}" | ||
export APTOS_PUBLIC_KEY="${{ inputs.public-key }}" | ||
export APTOS_ACCOUNT_ADDRESS="${{ inputs.address }}" | ||
envsubst < .github/aptos_cli/config.yaml > ${APTOS_CONFIG_PATH} |
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,7 @@ | ||
--- | ||
profiles: | ||
default: | ||
private_key: "${APTOS_PRIVATE_KEY}" | ||
public_key: "${APTOS_PUBLIC_KEY}" | ||
account: "${APTOS_ACCOUNT_ADDRESS}" | ||
rest_url: "${APTOS_REST_URL}" |
File renamed without changes.
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gitsubmodule" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |