mirror of
https://github.com/p-stream/backend.git
synced 2026-04-06 20:39:25 +00:00
Enhance Docker publish workflow with concurrency and tags
This commit is contained in:
parent
a37f5a9e22
commit
783e486346
1 changed files with 6 additions and 1 deletions
7
.github/workflows/docker-publish.yml
vendored
7
.github/workflows/docker-publish.yml
vendored
|
|
@ -5,6 +5,10 @@ on:
|
|||
push:
|
||||
branches: [ "master" ] # Change to your default branch
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -26,7 +30,8 @@ jobs:
|
|||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build -t ghcr.io/${{ github.repository_owner }}/backend:latest .
|
||||
docker build -t ghcr.io/${{ github.repository_owner }}/backend:latest -t ghcr.io/${{ github.repository_owner }}/backend:${{ github.sha }} .
|
||||
- name: Push Docker image
|
||||
run: |
|
||||
docker push ghcr.io/${{ github.repository_owner }}/backend:latest
|
||||
docker push ghcr.io/${{ github.repository_owner }}/backend:${{ github.sha }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue