diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index e5e1f5d0..2bafce1f 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -13,19 +13,33 @@ jobs: - name: Checkout the repository uses: actions/checkout@v3.0.0 + - name: Get Short Commit SHA + run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" + - name: Login to Docker Hub uses: docker/login-action@v1.14.1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v1.14.1 + with: + registry: ghcr.io + username: $GITHUB_REPOSITORY_OWNER + password: ${{ secrets.GH_TOKEN }} + - name: Build and Push Server Docker Image uses: docker/build-push-action@v2.9.0 with: context: . push: true file: server/Dockerfile - tags: amruthpillai/reactive-resume:server + tags: | + amruthpillai/reactive-resume:server-latest + amruthpillai/reactive-resume:server-${{ steps.slug.outputs.sha8 }} + ghcr.io/amruthpillai/reactive-resume:server-latest + ghcr.io/amruthpillai/reactive-resume:server-${{ steps.slug.outputs.sha8 }} - name: Build and Push Client Docker Image uses: docker/build-push-action@v2.9.0 @@ -33,4 +47,8 @@ jobs: context: . push: true file: client/Dockerfile - tags: amruthpillai/reactive-resume:client + tags: | + amruthpillai/reactive-resume:client-latest + amruthpillai/reactive-resume:client-${{ steps.slug.outputs.sha8 }} + ghcr.io/amruthpillai/reactive-resume:client-latest + ghcr.io/amruthpillai/reactive-resume:client-${{ steps.slug.outputs.sha8 }} diff --git a/server/Dockerfile b/server/Dockerfile index a2687551..64ebecb4 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update \ && apt-get install -y curl g++ make \ && curl -sL https://deb.nodesource.com/setup_16.x | bash \ && apt-get install -y nodejs \ - && npx playwright install-deps chromium + && PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install-deps chromium RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm