Skip to content

GLM Build

GLM Build #108

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: GLM Build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- main
- glm
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Docker Login
uses: docker/[email protected]
with:
registry: harbor2.vantage6.ai
username: ${{ secrets.HARBOR2_USERNAME }}
password: ${{ secrets.HARBOR2_TOKEN }}
- name: Extract branch name and commit hash
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "${GITHUB_REF#refs/heads/}"
id: vars
- name: RELEASE build and push Docker image
uses: docker/[email protected]
if: steps.vars.outputs.branch == 'main'
with:
push: True
context: .
file: ./models/glm/docker/Dockerfile
tags: |
harbor2.vantage6.ai/algorithms/glm:latest
harbor2.vantage6.ai/algorithms/glm:${{ steps.vars.outputs.sha_short }}
- name: TEST build and push Docker image
uses: docker/[email protected]
if: steps.vars.outputs.branch == 'glm'
with:
push: True
context: .
file: ./models/glm/docker/Dockerfile
tags: harbor2.vantage6.ai/algorithms/glm:${{ steps.vars.outputs.sha_short }}
- name: Docker Login (starter)
uses: docker/[email protected]
with:
registry: harbor2.vantage6.ai/starter
username: ${{ secrets.STARTER_HARBOR_USER }}
password: ${{ secrets.STARTER_HARBOR_SECRET }}
- name: STARTER build and push Docker image
uses: docker/[email protected]
with:
push: True
context: .
file: ./models/glm/docker/Dockerfile
tags: |
harbor2.vantage6.ai/starter/glm
- name: Discord notification
uses: fateyan/action-discord-notifier@v1
with:
message-title: 'harbor2.vantage6.ai/algorithms/glm:${{ steps.vars.outputs.sha_short }} has been built.'
webhook: ${{ secrets.DISCORD_BUILD_TOKEN }}