Skip to content

Build docker automatically (#77) #1

Build docker automatically (#77)

Build docker automatically (#77) #1

Workflow file for this run

name: Build Docker
on:
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
paths-ignore:
- '.devcontainer/**'
- '.github/ISSUE_TEMPLATE/**'
- 'images/**'
- 'playground/**'
- '**.md'
pull_request:
branches: [ "main" ]
env:
IMAGE_NAME: astra_agents_server
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- id: pre-step
shell: bash
run: echo "image-tag=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Build & Publish to Github Container Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.actor }}/${{ env.IMAGE_NAME }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
tags: "latest,${{ steps.pre-step.outputs.image-tag }}"
no_push: ${{ github.event_name == 'pull_request' }}