Skip to content

Update builddocker.yml #3

Update builddocker.yml

Update builddocker.yml #3

Workflow file for this run

name: cubelab-docker
on:
workflow_dispatch:
push:
env:
REGISTRY: ghcr.io
IMAGE_NAME: openuc2/CubeLab
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set architecture to lowercase
run: echo "ARCH=$(echo ${{ runner.arch }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and push container image to registry
uses: docker/build-push-action@v2
with: #sudo docker build --file ./docker/manyfold.dockerfile --build-arg APP_VERSION=test --build-arg GIT_SHA=00 --tag cubelab .
context: docker
file: ./docker/manyfold.dockerfile
push: true
platforms: linux/amd64
cache-from: type=registry,ref=ghcr.io/${{ env.IMAGE_NAME }}:latest
cache-to: type=inline
tags: ghcr.io/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_DATE=${{ github.run_id }}
APP_VERSION=test
GIT_SHA=00