Skip to content

New Chains Inputs

New Chains Inputs #4

name: staging-image
on:
push:
branches:
- main
paths-ignore:
# Ignore when changes is made by flux
- 'staging/**'
- 'production/**'
# Ignore markdown files
- "**/*.md"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# https://stackoverflow.com/questions/60942067/get-current-date-and-time-in-github-workflows
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M')"
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: devlaunchers/onboarding-bot-model # list of Docker images to use as base name for tags
# generate Docker tags based on the following events/attributes
# flux image update policy sorts by timestamp
tags: |
type=raw,value={{sha}}-${{ steps.date.outputs.date }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
context: ./langserves/basic
file: ./langserves/basic/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}