Build and Push Docker Images #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Docker Images | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch to build (optional)' | |
required: false | |
schedule: | |
- cron: "0 0 * * 1" | |
push: | |
branches: | |
- 'v1.*' | |
paths: | |
- Dockerfile | |
jobs: | |
build_and_push: | |
name: Build and Push Docker Image | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: | |
- v1.11.5 | |
- v1.11.6 | |
- v1.11.7 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch || matrix.branch }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.REGISTRY_TOKEN }} | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: ghcr.io/blueprintframework/blueprint:${{ github.event.inputs.branch || matrix.branch }} |