Skip to content

chain-space: Fix bug of Space Creator Delegating Themselves (#505) #119

chain-space: Fix bug of Space Creator Delegating Themselves (#505)

chain-space: Fix bug of Space Creator Delegating Themselves (#505) #119

Workflow file for this run

name: docker
on:
push:
branches:
- develop
- "release*"
jobs:
build_and_push_x86_64:
runs-on: ubuntu-latest
env:
REGISTRY: docker.io
USERNAME: dhiway
IMAGE_NAME: ${{ github.event.repository.name }}
COMMIT_SHA: ${{ github.sha }}
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: "${{ secrets.DOCKER_PASSWORD }}"
- name: Build and Push to Docker Hub
run: |
# Get the branch name
DOCKER_BRANCH=${{ github.ref }}
DOCKER_BRANCH=${DOCKER_BRANCH/refs\/heads\//}
export DOCKER_BUILDKIT=1
docker build --no-cache --file docker/Dockerfile --tag ${{ env.IMAGE_NAME}}:$DOCKER_BRANCH .
docker tag \
${{ env.IMAGE_NAME}}:$DOCKER_BRANCH \
${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME}}:${{ env.COMMIT_SHA}} \
&& docker tag \
${{ env.IMAGE_NAME}}:$DOCKER_BRANCH \
${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME}}:$DOCKER_BRANCH
docker push ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME}}:$DOCKER_BRANCH