Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflow/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
REPO_NAME: hls-website-installer

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker Login
run: # log into docker hub account
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD

# Build Image from the Dockerfile in Repo
- name: Build the Docker image # push The image to the docker hub
run: docker build . --file Dockerfile

- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
with:
path: ./

- name: Get current Version
run:
echo "${{steps.package-version.outputs.current-version}}"

- name: Docker Push
run: docker push $DOCKER_USER/$REPO_NAME:${{steps.package-version.outputs.current-version}}