Skip to content

Build And Push Image #4

Build And Push Image

Build And Push Image #4

Workflow file for this run

name: Build And Push Image
on:
push:
branches:
- master
workflow_dispatch:
permissions:
packages: write
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Compute image tag
id: vars
run: echo "sha_tag=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/openprojectx/error-sense-ui:${{ steps.vars.outputs.sha_tag }}
cache-from: type=gha
cache-to: type=gha,mode=max