Skip to content

Build and push Docker Image for branches for development #12

Build and push Docker Image for branches for development

Build and push Docker Image for branches for development #12

name: Build and push Docker Image for branches for development
on: workflow_dispatch
jobs:
push_to_registry:
name: Build and push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: "v${{ steps.package-version.outputs.current-version }}-${{ github.head_ref || github.ref_name }}"