Skip to content

v5.0.2

v5.0.2 #7

name: Publish Docker image
on:
release:
types: [ published ]
env:
REGISTRY: iconloop
ORIGIN_NAME: btp2-bsc/relay
IMAGE_NAME: relay-bsc
TAG: latest
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: make relay-image
- name: Push Docker image
run: |
docker tag ${{ env.ORIGIN_NAME }}:${{ env.TAG }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:${{ env.TAG }}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
docker tag ${{ env.ORIGIN_NAME }}:${{ env.TAG }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}