Skip to content

Commit

Permalink
Add date to docker images tags
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashbrnrd committed Jun 12, 2024
1 parent d30a161 commit be40ddc
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/dnum-mi/basegun/basegun-backend
tags: |
type=raw,value=$(date +"%Y-%m-%d")
type=raw,value=${{ github.head_ref }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: ghcr.io/dnum-mi/basegun/basegun-backend:${{ github.head_ref }}
tags: ${{ steps.meta.outputs.tags }}

build-frontend:
name: Build Frontend
Expand All @@ -48,12 +56,20 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/dnum-mi/basegun/basegun-frontend
tags: |
type=raw,value=$(date +"%Y-%m-%d")
type=raw,value=${{ github.head_ref }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./frontend
push: true
tags: ghcr.io/dnum-mi/basegun/basegun-frontend:${{ github.head_ref }}
tags: ${{ steps.meta.outputs.tags }}

test-backend:
name: Test Backend
Expand Down

0 comments on commit be40ddc

Please sign in to comment.