Skip to content

Created workflow/main.yml #1

Created workflow/main.yml

Created workflow/main.yml #1

Workflow file for this run

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 }}