mirror of
https://github.com/PreMiD/PreMiD.git
synced 2026-04-05 20:31:58 +02:00
* feat: add missing files * chore: update readme * chore: update branch * chore: remove olds from matrix * chore: remove dev containers
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: Build and Push Docker Image
|
|
description: Builds a Docker image and pushes it to GitHub Container Registry
|
|
inputs:
|
|
app:
|
|
description: Name of the app
|
|
required: true
|
|
token:
|
|
description: GitHub token
|
|
required: true
|
|
outputs:
|
|
version:
|
|
description: Version of the app
|
|
value: ${{ steps.get_version.outputs.version }}
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get package.json version
|
|
id: get_version
|
|
run: echo ::set-output name=version::$(node -p "require('./apps/${{ inputs.app }}/package.json').version")
|
|
shell: bash
|
|
|
|
- name: Convert repository owner to lowercase
|
|
id: repo
|
|
run: echo "::set-output name=lowercase::$(echo ${{ github.repository_owner }} | awk '{print tolower($0)}')"
|
|
shell: bash
|
|
|
|
- name: Build and Push Docker Image
|
|
uses: premid/premid/.github/actions/build-docker@monorepo
|
|
with:
|
|
dockerfile: ./apps/${{ inputs.app }}/Dockerfile
|
|
push: true
|
|
token: ${{ inputs.token }}
|
|
tags: ghcr.io/${{ steps.repo.outputs.lowercase }}/${{ inputs.app }}:${{ steps.get_version.outputs.version }},ghcr.io/${{ steps.repo.outputs.lowercase }}/${{ inputs.app }}:latest
|