Compare commits
1 Commits
ea832d56f4
...
d2a4b27ff3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2a4b27ff3 |
@ -30,7 +30,6 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
@ -61,11 +60,26 @@ jobs:
|
||||
|
||||
echo "CalVer version: ${VERSION}"
|
||||
|
||||
- name: Build Docker image
|
||||
# Dev build: push with dev + dev-SHA tags (PR/feature branches)
|
||||
- name: Build Docker image (dev)
|
||||
if: github.ref != 'refs/heads/main'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.ref == 'refs/heads/main' }}
|
||||
push: true
|
||||
tags: |
|
||||
manticorum67/paper-dynasty-discordapp:dev
|
||||
manticorum67/paper-dynasty-discordapp:dev-${{ steps.meta.outputs.sha_short }}
|
||||
cache-from: type=registry,ref=manticorum67/paper-dynasty-discordapp:buildcache
|
||||
cache-to: type=registry,ref=manticorum67/paper-dynasty-discordapp:buildcache,mode=max
|
||||
|
||||
# Production build: push with latest + CalVer tags (main only)
|
||||
- name: Build Docker image (production)
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
manticorum67/paper-dynasty-discordapp:latest
|
||||
manticorum67/paper-dynasty-discordapp:${{ steps.meta.outputs.version }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user