Skip to content

release-image

release-image #12

Workflow file for this run

name: release-image
on:
workflow_dispatch:
env:
IMAGE_NAME: paritytech/revive-remix-backend
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
environment: main
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Extract version from package.json
id: version
run: echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
- name: Build and push Docker image from main
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.IMAGE_NAME }}:latest