- manual start ci docker build
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 20s
unit-tests Link to Bats reports
CI Feature / Bats tests (push) Successful in 1m47s
acc-tests Link to Cucumber reports
CI Feature / Cucumber tests (push) Successful in 1m11s
CI Feature / Report Summary (push) Successful in 5s
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 20s
unit-tests Link to Bats reports
CI Feature / Bats tests (push) Successful in 1m47s
acc-tests Link to Cucumber reports
CI Feature / Cucumber tests (push) Successful in 1m11s
CI Feature / Report Summary (push) Successful in 5s
- parametroitu job
This commit is contained in:
@@ -12,31 +12,32 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
tag:
|
||||
required: true
|
||||
required: false
|
||||
type: string
|
||||
default: 'latest'
|
||||
secrets:
|
||||
DOCKER_USERNAME:
|
||||
required: false
|
||||
DOCKER_PASSWORD:
|
||||
required: true
|
||||
|
||||
env:
|
||||
DOCKER_REGISTRY: ${{ fromJson(inputs.env_json).DOCKER_REGISTRY || '' }}
|
||||
IMAGE_NAME: ${{ inputs.image_name }}
|
||||
TAG: ${{ inputs.tag }}
|
||||
DOCKERFILE: ${{ inputs.dockerfile_path }}
|
||||
|
||||
jobs:
|
||||
build-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build and push CI container
|
||||
- name: Build and push container
|
||||
env:
|
||||
DOCKER_REGISTRY: ${{ fromJson(inputs.env_json).DOCKER_REGISTRY || '' }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME || github.actor }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
run: |
|
||||
REGISTRY="${DOCKER_REGISTRY:?DOCKER_REGISTRY not set in conf}"
|
||||
DOCKERFILE="${{ inputs.dockerfile_path }}"
|
||||
IMAGE_NAME="${{ inputs.image_name }}"
|
||||
TAG="${{ inputs.tag }}"
|
||||
|
||||
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
docker build \
|
||||
--label "git.commit=${{ github.sha }}" \
|
||||
@@ -45,7 +46,6 @@ jobs:
|
||||
-f "${DOCKERFILE}" \
|
||||
-t "${IMAGE_NAME}:${TAG}" .
|
||||
|
||||
REGISTRY="${DOCKER_REGISTRY:?DOCKER_REGISTRY not set in env.conf}"
|
||||
REGISTRY_HOST="${REGISTRY%%/*}"
|
||||
|
||||
FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${TAG}"
|
||||
|
||||
@@ -1,21 +1,41 @@
|
||||
name: Build CI Cucumber Container (Manual)
|
||||
on: workflow_dispatch
|
||||
name: CI Container Build Cucumber
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
config_path:
|
||||
required: true
|
||||
type: string
|
||||
default: '.gitea/workflows/example-gitea-env.conf'
|
||||
description: 'Polku .gitea-env.conf-tiedostoon'
|
||||
dockerfile_path:
|
||||
required: true
|
||||
type: string
|
||||
default: 'Dockerfile.ci-cucumber'
|
||||
description: 'Polku Dockerfileen'
|
||||
image_name:
|
||||
required: true
|
||||
type: string
|
||||
default: 'ci-cucumber'
|
||||
description: 'Kontin nimi ilman registry-polkua'
|
||||
tag:
|
||||
required: true
|
||||
type: string
|
||||
default: 'latest'
|
||||
description: 'Image-tägi'
|
||||
|
||||
jobs:
|
||||
load-config:
|
||||
name: Load config
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/config-provider.yml@main
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/config-provider.yml@v1
|
||||
secrets: inherit
|
||||
with:
|
||||
config_path: .gitea/workflows/example-gitea-env.conf
|
||||
config_path: ${{ inputs.config_path }}
|
||||
|
||||
build-push:
|
||||
name: Build & Push
|
||||
needs: [load-config]
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/ci-container-build-push.yml@main
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/ci-container-build-push.yml@v1
|
||||
secrets: inherit
|
||||
with:
|
||||
env_json: ${{ needs.load-config.outputs.env_json }}
|
||||
dockerfile_path: Dockerfile.ci-cucumber
|
||||
image_name: ci-cucumber
|
||||
tag: latest
|
||||
dockerfile_path: ${{ inputs.dockerfile_path }}
|
||||
image_name: ${{ inputs.image_name }}
|
||||
tag: ${{ inputs.tag }}
|
||||
|
||||
Reference in New Issue
Block a user