Skip to content

Commit

Permalink
update ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
vorant94 committed Apr 21, 2024
1 parent c35fdd6 commit d02f331
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: CI/CD

on: push

permissions:
contents: read
packages: write

jobs:
format-build-test-e2e:
format-build-test-and-e2e:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -33,3 +37,29 @@ jobs:
name: playwright-report
path: ./packages/blog/playwright-report/
retention-days: 30

build-and-push:
runs-on: ubuntu-latest
needs: format-build-test-and-e2e
steps:
- uses: actions/checkout@v4

- uses: docker/setup-qemu-action@v3

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghrc.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- id: extract-version
run: echo "VERSION=$(jq -r .version < package.json)" >> $GITHUB_OUTPUT

- uses: docker/build-push-action@v5
with:
context: .
file: ./packages/blog/Dockerfile
push: true
tags: vorant94/digital-garden-blog:${{ steps.extract-version.outputs.VERSION }}

0 comments on commit d02f331

Please sign in to comment.