Skip to content

feat: initial configuration #1 #2

feat: initial configuration #1

feat: initial configuration #1 #2

Workflow file for this run

name: Build
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
runner-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
timeout-minutes: 1
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: improwised/jre-ghar-image
tags: |
type=raw,value={{github.ref_name}}-{{sha}}-{{date 'X'}}
type=raw,value=latest
timeout-minutes: 1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
timeout-minutes: 1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
timeout-minutes: 1
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
timeout-minutes: 5