41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: build
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
tag:
|
|
required: false
|
|
type: string
|
|
default: latest
|
|
secrets:
|
|
username:
|
|
required: false
|
|
type: string
|
|
default: ${{ secrets.REGISTRY_USERNAME }}
|
|
password:
|
|
required: false
|
|
type: string
|
|
default: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: git.qlic.nl/qlic/build:latest
|
|
credentials:
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.qlic.nl
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build
|
|
run: docker build . -t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ inputs.tag }} -t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ gitea.sha }}
|
|
- name: Push
|
|
run: docker push ${{ vars.REGISTRY }}/${{ gitea.repository }} --all-tags
|