adjust build tags
This commit is contained in:
parent
3ee9ab873a
commit
1c8a09c178
1 changed files with 16 additions and 9 deletions
25
.github/workflows/docker-hub.yml
vendored
25
.github/workflows/docker-hub.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Docker Hub Image Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: ["main", "develop"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-image:
|
docker-image:
|
||||||
|
|
@ -27,11 +27,18 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push the Docker image
|
- name: Build and push the Docker image (versioned tag)
|
||||||
uses: docker/build-push-action@v5.3.0
|
uses: docker/build-push-action@v5.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/allthemods10:${{ env.SERVER_VERSION }}
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/allthemods10:latest
|
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/allthemods10:${{ env.SERVER_VERSION }}
|
- name: Build and push the Docker image (latest tag)
|
||||||
|
if: ${{ github.ref_name == 'main' }}
|
||||||
|
uses: docker/build-push-action@v5.3.0
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/allthemods10:latest
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue