Skip to content

Commit

Permalink
变化:调整构建action +4
Browse files Browse the repository at this point in the history
  • Loading branch information
guobao2333 committed Sep 9, 2024
1 parent 615dd9c commit f615dfa
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ jobs:
type=sha
type=raw,value=latest
- name: Add tag based on condition
run: |
if [[ ${{ github.ref }} =~ refs/tags/v ]]; then
echo "##${{ github.event.ref }}" >> $GITHUB_OUTPUT
else
echo "##${{ github.event_time }}" >> $GITHUB_OUTPUT
fi
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
Expand All @@ -75,12 +83,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Add tag based on condition
run: |
if [[ ${{ github.ref }} =~ refs/tags/v ]]; then
echo "##${{ github.event.ref }}" >> $GITHUB_OUTPUT
else
echo "##${{ github.event_time }}" >> $GITHUB_OUTPUT
fi
cache-to: type=gha,mode=max

0 comments on commit f615dfa

Please sign in to comment.