Skip to content

測試

測試 #15

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ["release"]
pull_request:
branches: ["release"]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- id: lastest_tag
name: Show tags
run: |
git fetch --tags
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "tag=$latest_tag" >> "$GITHUB_OUTPUT"
echo "💡 Latest tag: $latest_tag"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push tag
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: smile0301/auto-pixai:${{ steps.latest_tag.outputs.tag }}
- name: Build and push latest
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: smile0301/auto-pixai:latest