Skip to content

Update docker-image.yml #13

Update docker-image.yml

Update docker-image.yml #13

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Branch name
run: echo running on branch ${{ github.head_ref }} / ${{ github.ref_name }}
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_LOGIN }} --password-stdin
- name: build docker image
run: docker build . --file ./docker/dockerfile --tag abmptit/docker-lab-static-website:${{ github.head_ref }}${{ github.ref_name }}
- name: Push the Docker image
run: docker push abmptit/docker-lab-static-website:${{ github.head_ref }}${{ github.ref_name }}