Skip to content

Commit

Permalink
Merge pull request #655 from solliancenet/mg-0.4.0-pr-2
Browse files Browse the repository at this point in the history
RELEASE 0.4.0: AZD Fixes
  • Loading branch information
ciprianjichici authored Feb 22, 2024
2 parents 3370d92 + b446da9 commit e2585c2
Show file tree
Hide file tree
Showing 16 changed files with 1,907 additions and 1,908 deletions.
188 changes: 94 additions & 94 deletions .github/workflows/release-docker-image.yml
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 }}
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
Loading

0 comments on commit e2585c2

Please sign in to comment.