Skip to content

Docker Build

Docker Build #119

Workflow file for this run

name: Docker Build
on:
workflow_dispatch:
inputs:
tag:
description: "Docker tag"
required: true
default: "latest"
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Declare some variables
id: vars
shell: bash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Admin
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}/admin:${{ github.event.inputs.tag }}
build-args: COMMIT=${{ steps.vars.outputs.sha_short }}, APP=admin, START_COMMAND=start
# - name: Build and Push Docker Image
# uses: docker/build-push-action@v2
# with:
# context: .
# push: true
# tags: ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}, ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.sha_short }}
# image: ${{ github.repository }}
# buildArgs: COMMIT=${{ steps.vars.outputs.sha_short }}
# registry: ghcr.io