Skip to content

Commit

Permalink
Created workflow/main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tinavisnovska authored Feb 6, 2024
1 parent 2bb5d60 commit ce4b590
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Docker Build
on:
push:
branches:
- main
# tags:
# - '*.*.*'

jobs:
build:
name: Build Image
runs-on: ubuntu-latest
steps:
-
name: Check out the repo
uses: actions/checkout@v4
-
name: Lint Dockerfile
uses: hadolint/[email protected]
-
name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
inpred/${{ github.repository }}
tags: |
latest
type=semver,pattern={{raw}}
-
name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push image to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit ce4b590

Please sign in to comment.