Skip to content

Commit

Permalink
git action added
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Apr 9, 2024
1 parent 57eb94f commit f38bf5f
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker-community-push-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker Image Backend LLM Community latest CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: tiledesk/tiledesk-backend-llm

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: tiledesk/tiledesk-backend-llm:latest
44 changes: 44 additions & 0 deletions .github/workflows/docker-image-tag-community-tag-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docker Image Backend LLM Community latest CI

env:
REGISTRY: tiledesk
IMAGE_NAME: tiledesk-backend-llm

on:
push:
tags:
- '**' # Push events to every tag including hierarchical tags like
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3

with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tag_with_ref: true

- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit f38bf5f

Please sign in to comment.