fix release script #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Required top-level properties | |
name: Release | |
# Required "on" property with at least one event | |
on: | |
push: | |
tags: | |
- 'v*' | |
# Required "jobs" property with at least one job | |
jobs: | |
docker: | |
name: Build and Push Docker Image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Get current date | |
id: date | |
run: echo "date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Extract metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: docker.io/${{ secrets.DOCKER_USERNAME }}/ai-gateway-ce | |
tags: | | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
VERSION=${{ github.ref_name }} | |
GIT_COMMIT=${{ github.sha }} | |
BUILD_DATE=${{ steps.date.outputs.date }} | |
cache-from: type=registry,ref=docker.io/${{ secrets.DOCKER_USERNAME }}/ai-gateway-ce:buildcache | |
cache-to: type=registry,ref=docker.io/${{ secrets.DOCKER_USERNAME }}/ai-gateway-ce:buildcache,mode=max |