Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
simplyboo6 authored Nov 23, 2023
1 parent 32942d2 commit 3cf30a5
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
name: Docker Image CI

name: Build and publish a Docker image
on:
push:
branches: [ "master" ]
branches:
- '*'
pull_request:
branches: [ "master" ]

branches:
- '*'
jobs:
build:
name: Build & push docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag simplyboo6/vimtur:latest
- name: Checkout
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v1
if: ${{ github.ref == 'refs/heads/master' }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.ref == 'refs/heads/master' }}
tags: simplyboo6/vimtur:latest

0 comments on commit 3cf30a5

Please sign in to comment.