41 lines
990 B
YAML
41 lines
990 B
YAML
name: Build Base Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'Dockerfile.base'
|
|
schedule:
|
|
- cron: '@monthly'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
|
|
REGISTRY_IMAGE_NAME: ${{ secrets.REGISTRY_IMAGE_NAME }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Base Image
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ secrets.REGISTRY_URL }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push base image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile.base
|
|
push: true
|
|
tags: ${{ env.REGISTRY_IMAGE_NAME }}:latest |