Skip to content

fix:Dockerfile (#11) #26

fix:Dockerfile (#11)

fix:Dockerfile (#11) #26

Workflow file for this run

name: image-build
on:
push:
branches:
- "main"
paths:
- "Dockerfile"
- ".github/workflows/image-build.yaml"
- "!**.md"
jobs:
image-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
timeout-minutes: 5
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
timeout-minutes: 5
with:
images: improwised/ghar-image
tags: |
type=raw,value={{branch}}-{{sha}}-{{date 'X'}}
type=raw,value=latest
labels: |
org.opencontainers.image.title=ghar-image
org.opencontainers.image.base.name=summerwind/actions-runner-dind
org.opencontainers.image.vendor=improwised
org.opencontainers.image.authors=pratikbalar
org.opencontainers.image.licenses=Apache-2.0
org.opencontainers.image.description=github actions self hosted runner image
org.opencontainers.image.version={{version}}
org.opencontainers.image.source=https://github.com/Improwised/docker-ghar-image
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
timeout-minutes: 5
- name: Login to DockerHub
uses: docker/login-action@v3
timeout-minutes: 5
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
timeout-minutes: 5
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}