Add jq-based healthcheck script for checking the readiness endpoint #5
Workflow file for this run
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
# cspell:word TOOLSDIRECTORY | |
# cspell:word autoremove | |
# cspell:word pipx | |
# yamllint disable rule:empty-lines rule:key-ordering | |
--- | |
name: 'Build the aptos-cli Docker image and push to Docker Hub' | |
'on': | |
push: | |
tags: | |
- 'aptos-cli-v*' | |
workflow_dispatch: | |
inputs: | |
cli_version: | |
description: >- | |
Aptos CLI version to build, for example, 4.0.0 | |
required: true | |
type: 'string' | |
jobs: | |
build-push: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: 'actions/checkout@v4' | |
- name: 'Remove unused packages to free up runner disk space' | |
# yamllint disable rule:indentation | |
run: | | |
sudo rm -rf \ | |
"$AGENT_TOOLSDIRECTORY" \ | |
/opt/google/chrome \ | |
/opt/microsoft/msedge \ | |
/opt/microsoft/powershell \ | |
/opt/pipx \ | |
/usr/lib/mono \ | |
/usr/local/julia* \ | |
/usr/local/lib/android \ | |
/usr/local/lib/node_modules \ | |
/usr/local/share/chromium \ | |
/usr/local/share/powershell \ | |
/usr/share/dotnet \ | |
/usr/share/swift | |
sudo apt clean | |
sudo apt autoremove -y | |
df -h / | |
# yamllint enable rule:indentation | |
- id: 'metadata' | |
uses: 'docker/metadata-action@v5' | |
with: | |
images: 'econialabs/aptos-cli' | |
tags: > | |
type=match,pattern=aptos-cli-v(.*),group=1, | |
enable=${{ github.event_name == 'push' }} | |
type=raw,value=${{ github.event.inputs.cli_version }}, | |
enable=${{ github.event_name == 'workflow_dispatch' }} | |
- uses: 'docker/setup-qemu-action@v3' | |
- uses: 'docker/setup-buildx-action@v3' | |
- uses: 'docker/login-action@v3' | |
with: | |
password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
- uses: 'docker/build-push-action@v6' | |
with: | |
cache-from: 'type=gha' | |
cache-to: 'type=gha,mode=max' | |
context: '.' | |
file: 'src/aptos-cli/Dockerfile' | |
push: true | |
labels: '${{ steps.metadata.outputs.labels }}' | |
platforms: '${{ vars.DOCKER_IMAGE_PLATFORMS }}' | |
tags: '${{ steps.metadata.outputs.tags }}' | |
build-args: | | |
CLI_VERSION=${{ steps.metadata.outputs.version }} | |
timeout-minutes: 360 | |
... |