Skip to content

change footer

change footer #16

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: |
if [ ${{ github.head_ref }} != "" ]; then
echo running on branch ${{ github.head_ref }}
else
echo running on branch ${{ github.ref_name }}
fi
- 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: |
if [ ${{ github.head_ref }} != "" ]; then
docker build . --file ./docker/dockerfile --tag abmptit/docker-lab-static-website:${{ github.head_ref }}
else
docker build . --file ./docker/dockerfile --tag abmptit/docker-lab-static-website:${{ github.ref_name }}
fi
- name: Push the Docker image
run: |
if [ ${{ github.head_ref }} != "" ]; then
docker push abmptit/docker-lab-static-website:${{ github.head_ref }}
else
docker push abmptit/docker-lab-static-website:${{ github.ref_name }}
fi