36 lines
799 B
YAML
36 lines
799 B
YAML
name: Compile workflow.json and Build Project
|
|
|
|
run-name: ${{ gitea.actor }} is building 🚀
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
inputs:
|
|
WORKFLOWJSON:
|
|
description: 'Workflow Json'
|
|
default: ''
|
|
image:
|
|
description: 'Docker Image'
|
|
required: true
|
|
default: myworkflow
|
|
|
|
jobs:
|
|
build-image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Capture Workflow Json into file
|
|
if: ${{ inputs.WORKFLOWJSON != '' }}
|
|
run: |
|
|
cat << 'EOF' > workflow.json
|
|
${{ inputs.WORKFLOWJSON }}
|
|
EOF
|
|
|
|
- name: Build project to image
|
|
run: |
|
|
docker build -t ${{ inputs.image || vars.IMAGE || 'myworkflow' }} .
|
|
|