Skip to content

Add date to docker images tags #1204

Add date to docker images tags

Add date to docker images tags #1204

Workflow file for this run

name: CI for pr
on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
tag-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Tag PR
uses: release-drafter/release-drafter@v5
with:
name: PR ${{ github.ref }}
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-backend:
name: Build Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: |

Check failure on line 37 in .github/workflows/pr.yml

View workflow run for this annotation

GitHub Actions / CI for pr

Invalid workflow file

The workflow is not valid. .github/workflows/pr.yml (Line: 37, Col: 17): Unexpected symbol: '$'. Located at position 1 within expression: $(date +"%Y-%m-%d") .github/workflows/pr.yml (Line: 58, Col: 17): Unexpected symbol: '$'. Located at position 1 within expression: $(date +"%Y-%m-%d")
ghcr.io/dnum-mi/basegun/basegun-backend:${{ github.head_ref }}
ghcr.io/dnum-mi/basegun/basegun-backend:${{ $(date +"%Y-%m-%d") }}
build-frontend:
name: Build Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- 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 }}
ghcr.io/dnum-mi/basegun/basegun-frontend:${{ $(date +"%Y-%m-%d") }}
test-backend:
name: Test Backend
needs: build-backend
runs-on: ubuntu-latest
container:
image: ghcr.io/dnum-mi/basegun/basegun-backend:${{ github.head_ref }}
env:
AWS_REGION: gra
AWS_DEFAULT_REGION: gra
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_URL_ENDPOINT: https://s3.gra.io.cloud.ovh.net/
S3_BUCKET_NAME: basegun-s3
steps:
- run: cd /app && pytest
test-frontend-format:
name: Test Frontend Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Prettier check
working-directory: frontend
run: |
npm ci
npm run format-check
test-e2e:
name: Run E2E tests
needs: [build-backend, build-frontend]
uses: ./.github/workflows/test-e2e.yml