pre-build-7 #21
Workflow file for this run
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: PRE RELEASED | |
on: | |
release: | |
types: [prereleased] | |
jobs: | |
build: | |
runs-on: codebuild-f-ai-builder-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-medium | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v3 | |
- name: Repository Variable to Lowercase | |
id: string | |
uses: ASzc/change-string-case-action@v1 | |
with: | |
string: ${{ github.repository }} | |
- name: Login GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
images: ghcr.io/${{ steps.string.outputs.lowercase }} | |
tags: | | |
# set latest tag for default branch | |
type=raw,value=${{github.event.release.tag_name}} | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=ref,event=pr | |
type=semver,pattern=v{{version}} | |
type=semver,pattern=v{{major}}.{{minor}} | |
type=semver,pattern=v{{major}} | |
type=sha | |
type=sha,format=long | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./fai-rag-app/ | |
platforms: linux/amd64 | |
file: ./fai-rag-app/Dockerfile.base | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
no-cache: false | |
build-args: GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy container to Jelastic | |
run: | | |
curl --request GET --url 'https://app.jelastic.elastx.net/1.0/environment/control/rest/redeploycontainerbyid?session=${{ secrets.JELASTIC_API_KEY }}&nodeId=${{ secrets.JELASTIC_NODE_ID_PRE_RELEASE }}&envName=${{ secrets.JELASTIC_ENV_NAME_PRE_RELEASE }}&tag=${{github.event.release.tag_name}}&useExistingVolumes=true' | |
shell: bash |