testutil/promrated: fixing promrated network overview stats (#3234) #27
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
on: | |
push: | |
branches: | |
- main | |
paths: | |
- testutil/promrated/* | |
name: Build and Deply Promrated Image | |
jobs: | |
build-docker: | |
runs-on: ubuntu-latest | |
name: Build Docker Image | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
- uses: docker/setup-buildx-action@v1 | |
- name: Define docker image meta data tags | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: | | |
obolnetwork/promrated | |
ghcr.io/obolnetwork/promrated | |
tags: | | |
# Tag "git short sha" on all git events | |
type=sha,prefix= | |
# Tag "latest" on all git events | |
type=raw,value=latest | |
- name: Login to Github container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to Dockerhub container registry | |
uses: docker/login-action@v2 | |
with: | |
username: obolnetwork | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./testutil/promrated/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: GITHUB_SHA=${{ github.sha }} | |
tags: ${{ steps.meta.outputs.tags }} | |
- name: Set short git commit SHA | |
id: vars | |
run: | | |
calculatedSha=$(git rev-parse --short=7 ${{ github.sha }}) | |
echo "::set-output name=short_sha::$calculatedSha" | |
- name: Confirm git commit SHA output | |
run: echo ${{ steps.vars.outputs.short_sha }} | |
- name: Trigger promrated deploy job | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.CHARON_K8S_REPO_ACCESS_TOKEN }} | |
repository: ObolNetwork/obol-infrastructure | |
event-type: promrated-apply | |
client-payload: '{"tag": "${{ steps.vars.outputs.short_sha }}"}' |