Skip to content
name: Publish Image to DockerHub
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- name: DockerHub Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/oswp:${{ steps.package-version.outputs.current-version}}
- name: Docker Push
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/oswp:${{ steps.package-version.outputs.current-version}}