22 lines
905 B
YAML
22 lines
905 B
YAML
name: ci-workflow
|
|
|
|
on: [push]
|
|
jobs:
|
|
ci:
|
|
runs-on: docker
|
|
container:
|
|
image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/pipeline-container/kaniko:v1.23.2-2
|
|
steps:
|
|
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
|
- name: Clone Repository
|
|
uses: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/checkout@main
|
|
|
|
- name: Build Credentials File
|
|
run: |
|
|
mkdir -p /kaniko/.docker
|
|
AUTHSTRING=$(echo -n "${{ inputs.username }}:${{ inputs.password }}" | base64)
|
|
echo "{\"auths\":{\"${{ inputs.registry }}\":{\"auth\":\"${AUTHSTRING}\"}}}" > /kaniko/.docker/config.json
|
|
|
|
- name: Build Docker Container
|
|
run: |
|
|
/kaniko/executor --dockerfile=${{ inputs.dockerfile }} --context=${{ inputs.context }} --destination=${{ inputs.tag }}
|