Skip to content

Commit

Permalink
refactor: update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcanay committed Apr 19, 2024
1 parent d2ac471 commit 494fe79
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Get Version Tags
id: versions
run: |
echo "FRONTEND_VERSION=$(node -p "require('./frontend/package.json').version")" >> "$GITHUB_OUTPUT"
echo "BACKEND_VERSION=$(echo "$(<backend/api/routes.py)" | grep -oP "(?<=version=\")[^\"]+")" >> "$GITHUB_OUTPUT"
- name: Docker Login
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
node-version: 20
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: npm build
run: |
Expand All @@ -42,14 +42,14 @@ jobs:
npm ci --loglevel verbose --userconfig npmrc --max-old-space-size=16096 -legacy-peer-deps
npm run build --userconfig npmrc --max-old-space-size=16096
- name: Build & push frontend
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: ghcr.io/${{ steps.lowercase.outputs.REPO }}/frontend:latest-main, ghcr.io/${{ steps.lowercase.outputs.REPO }}/frontend:${{ steps.versions.outputs.FRONTEND_VERSION }}-main
- name: Build & push backend
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
Expand Down

0 comments on commit 494fe79

Please sign in to comment.