Add reminder note to manual Docker build workflow
(cherry picked from commit e6332ce512)
This commit is contained in:
parent
4e94f3a67c
commit
7386a21c0e
2 changed files with 21 additions and 15 deletions
30
.github/workflows/docker-build-lite.yml
vendored
30
.github/workflows/docker-build-lite.yml
vendored
|
|
@ -1,10 +1,10 @@
|
||||||
name: Build Lite Docker Image
|
name: Build Offline Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
_notes_:
|
_notes_:
|
||||||
description: '⚠️ Create lite Docker images only after non-trivial version releases.'
|
description: '⚠️ Create offline Docker images only after non-trivial version releases.'
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
@ -14,7 +14,7 @@ permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-lite:
|
build-and-push-offline:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
@ -34,12 +34,12 @@ jobs:
|
||||||
fi
|
fi
|
||||||
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
|
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Prepare lite tag
|
- name: Prepare offline tag
|
||||||
id: lite_tag
|
id: offline_tag
|
||||||
run: |
|
run: |
|
||||||
LITE_TAG="${{ steps.get_tag.outputs.tag }}-lite"
|
OFFLINE_TAG="${{ steps.get_tag.outputs.tag }}-offline"
|
||||||
echo "Lite image tag: $LITE_TAG"
|
echo "Offline image tag: $OFFLINE_TAG"
|
||||||
echo "lite_tag=$LITE_TAG" >> $GITHUB_OUTPUT
|
echo "offline_tag=$OFFLINE_TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Update version in __init__.py
|
- name: Update version in __init__.py
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -62,23 +62,23 @@ jobs:
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository }}
|
images: ghcr.io/${{ github.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=${{ steps.lite_tag.outputs.lite_tag }}
|
type=raw,value=${{ steps.offline_tag.outputs.offline_tag }}
|
||||||
type=raw,value=lite
|
type=raw,value=offline
|
||||||
|
|
||||||
- name: Build and push lite Docker image
|
- name: Build and push offline Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile.lite
|
file: ./Dockerfile.offline
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=min
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: Output image details
|
- name: Output image details
|
||||||
run: |
|
run: |
|
||||||
echo "Lite Docker image built and pushed successfully!"
|
echo "Offline Docker image built and pushed successfully!"
|
||||||
echo "Image tag: ghcr.io/${{ github.repository }}:${{ steps.lite_tag.outputs.lite_tag }}"
|
echo "Image tag: ghcr.io/${{ github.repository }}:${{ steps.offline_tag.outputs.offline_tag }}"
|
||||||
echo "Base Git tag used: ${{ steps.get_tag.outputs.tag }}"
|
echo "Base Git tag used: ${{ steps.get_tag.outputs.tag }}"
|
||||||
|
|
|
||||||
6
.github/workflows/docker-build-manual.yml
vendored
6
.github/workflows/docker-build-manual.yml
vendored
|
|
@ -2,6 +2,12 @@ name: Build Test Docker Image manually
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
_notes_:
|
||||||
|
description: '⚠️ Please create a new git tag before building the docker image.'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue