-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding change to build and push to 0.4.0-prerelease container registry
- Loading branch information
1 parent
c3ce334
commit a1362cc
Showing
1 changed file
with
95 additions
and
95 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,95 @@ | ||
name: Docker Image Build and Push | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
registry: | ||
type: string | ||
default: ghcr.io | ||
image: | ||
type: string | ||
required: true | ||
context: | ||
type: string | ||
required: true | ||
dockerfile: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
docker_image_build_and_push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Fetching the Latest Release Tag number | ||
id: releaseVersion | ||
run: | | ||
GIT_RELEASE=$(echo ${{ github.ref_name }} | cut -d'/' -f 2) | ||
echo "GIT_RELEASE=$GIT_RELEASE" >> $GITHUB_ENV | ||
echo "release_tag: Latest Tag is : $GIT_RELEASE" | ||
echo "release_tag=$GIT_RELEASE" >> $GITHUB_OUTPUT | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository }}/${{ inputs.image }} | ||
tags: | | ||
type=semver,pattern={{version}},value=${{ steps.releaseVersion.outputs.release_tag }} | ||
type=sha,format=long | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ${{ inputs.context }} | ||
file: ${{ inputs.dockerfile }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
build-args: | | ||
FOUNDATIONALLM_VERSION=${{ steps.releaseVersion.outputs.release_tag }} | ||
helm_chart_package_and_push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Fetching the Latest Release Tag number | ||
id: releaseVersion | ||
run: | | ||
GIT_RELEASE=$(echo ${{ github.ref_name }} | cut -d'/' -f 2) | ||
echo "GIT_RELEASE=$GIT_RELEASE" >> $GITHUB_ENV | ||
echo "release_tag: Latest Tag is : $GIT_RELEASE" | ||
echo "release_tag=$GIT_RELEASE" >> $GITHUB_OUTPUT | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Helm Chart Update, Package, and Push | ||
run: | | ||
cd ./deploy/common/helm/${{ inputs.image }} | ||
sed -i "s/version\: 0\.0\.0/version\: ${{ steps.releaseVersion.outputs.release_tag }}/" Chart.yaml | ||
sed -i "s/tag\: latest/tag\: ${{ steps.releaseVersion.outputs.release_tag }}/" values.yaml | ||
helm package . --app-version ${{ steps.releaseVersion.outputs.release_tag }} | ||
helm push ${{ inputs.image }}-${{ steps.releaseVersion.outputs.release_tag }}.tgz oci://ghcr.io/${{ github.repository }}/helm | ||
name: Docker Image Build and Push | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
registry: | ||
type: string | ||
default: ghcr.io | ||
image: | ||
type: string | ||
required: true | ||
context: | ||
type: string | ||
required: true | ||
dockerfile: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
docker_image_build_and_push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Fetching the Latest Release Tag number | ||
id: releaseVersion | ||
run: | | ||
GIT_RELEASE=$(echo ${{ github.ref_name }} | cut -d'/' -f 2) | ||
echo "GIT_RELEASE=$GIT_RELEASE" >> $GITHUB_ENV | ||
echo "release_tag: Latest Tag is : $GIT_RELEASE" | ||
echo "release_tag=$GIT_RELEASE" >> $GITHUB_OUTPUT | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
ghcr.io/solliancenet/fllm-0.4.0-prerelease/${{ inputs.image }} | ||
tags: | | ||
type=semver,pattern={{version}},value=${{ steps.releaseVersion.outputs.release_tag }} | ||
type=sha,format=long | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ${{ inputs.context }} | ||
file: ${{ inputs.dockerfile }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
build-args: | | ||
FOUNDATIONALLM_VERSION=${{ steps.releaseVersion.outputs.release_tag }} | ||
helm_chart_package_and_push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Fetching the Latest Release Tag number | ||
id: releaseVersion | ||
run: | | ||
GIT_RELEASE=$(echo ${{ github.ref_name }} | cut -d'/' -f 2) | ||
echo "GIT_RELEASE=$GIT_RELEASE" >> $GITHUB_ENV | ||
echo "release_tag: Latest Tag is : $GIT_RELEASE" | ||
echo "release_tag=$GIT_RELEASE" >> $GITHUB_OUTPUT | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Helm Chart Update, Package, and Push | ||
run: | | ||
cd ./deploy/common/helm/${{ inputs.image }} | ||
sed -i "s/version\: 0\.0\.0/version\: ${{ steps.releaseVersion.outputs.release_tag }}/" Chart.yaml | ||
sed -i "s/tag\: latest/tag\: ${{ steps.releaseVersion.outputs.release_tag }}/" values.yaml | ||
helm package . --app-version ${{ steps.releaseVersion.outputs.release_tag }} | ||
helm push ${{ inputs.image }}-${{ steps.releaseVersion.outputs.release_tag }}.tgz oci://ghcr.io/solliancenet/fllm-0.4.0-prerelease/helm |