Add test to check chronicle refund (#932) #97
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
name: Build Docker chronicle image | |
on: | |
push: | |
paths-ignore: | |
- 'contracts/**' | |
- '**/*.md' | |
- 'scripts/**' | |
- 'utils/**' | |
- 'tester/**' | |
- 'node/**' | |
branches: | |
- 'development' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
DOCKER_REPO: analoglabs/chronicle | |
jobs: | |
set-tags: | |
name: Get & set tags | |
runs-on: ubuntu-latest | |
outputs: | |
commit_hash: ${{ steps.get-sha.outputs.sha }} | |
commit_hash8: ${{ steps.get-sha.outputs.sha8 }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get SHA | |
id: get-sha | |
run: | | |
sha=$(git log -1 --format='%H') | |
echo "sha=$sha" >> $GITHUB_OUTPUT | |
echo "sha8=$(git log -1 --format='%H' | cut -c1-8)" >> $GITHUB_OUTPUT | |
echo "SHA commit:" $sha | |
build-binary: | |
name: Build Docker image | |
needs: ["set-tags"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch latest code | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: | | |
${{ env.DOCKER_REPO }}:${{ needs.set-tags.outputs.commit_hash8 }} | |
${{ env.DOCKER_REPO }}:latest | |
file: config/docker/Dockerfile.chronicle-release |