Skip to content

fixes

fixes #28

Workflow file for this run

name: "Build: Dev Container"
on:
push:
branches: [dev]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set lower case image name
run: echo "IMAGE_NAME_LC=${REPO,,}" >> $GITHUB_ENV
env:
REPO: ${{ github.repository }}
- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: build/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
APP_VERSION=dev
COMMIT_SHA=${{ github.sha }}
IMAGE_TAG=dev
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:dev
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.description=Craft - Dev Build
org.opencontainers.image.revision=${{ github.sha }}