Skip to content

Commit

Permalink
分開試試
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Smilin committed Apr 17, 2024
1 parent efb5691 commit d6274f0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ on:
branches: ["release"]

jobs:
docker:
tag:
runs-on: ubuntu-latest
outputs:
latest_tag: ${{ steps.latest_tag.outputs.tag }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Show tags
id: latest_tag
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"
docker:
runs-on: ubuntu-latest
needs: tag
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -29,11 +35,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push tag
env:
TAG: ${{needs.tag.outputs.latest_tag}}
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: smile0301/auto-pixai:${{ steps.latest_tag.outputs.tag }}
tags: smile0301/auto-pixai:$TAG
- name: Build and push latest
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit d6274f0

Please sign in to comment.