Skip to content

Commit

Permalink
Build docker automatically (#77)
Browse files Browse the repository at this point in the history
* feat: build docker

* fix: syntax

* test: ignored

* test: ignore

* test: remove test branch
  • Loading branch information
wangyoucao577 authored Jul 10, 2024
1 parent 5524645 commit a1ddace
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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' }}

0 comments on commit a1ddace

Please sign in to comment.