Merge pull request #1290 from CollageLabs/dependabot/npm_and_yarn/goo… #778
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Restoring node_modules cache | |
uses: actions/cache@v3 | |
with: | |
path: 'node_modules' | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} | |
- name: Restoring vendor/bundle cache | |
uses: actions/cache@v3 | |
with: | |
path: 'vendor/bundle' | |
key: ${{ runner.os }}-vendor-bundle-${{ hashFiles('Gemfile.lock') }} | |
- name: Set environment variable | |
run: | | |
echo "UID=$(id -u)" >> $GITHUB_ENV | |
echo "GID=$(id -g)" >> $GITHUB_ENV | |
touch .env | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Building docker image | |
uses: docker/build-push-action@v4 | |
with: | |
tags: collagelabs/collagelabs.org:latest | |
file: Dockerfile | |
context: . | |
build-args: | | |
UID=${{ env.UID }} | |
GID=${{ env.GID }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
push: false | |
load: true | |
- name: Building project | |
run: | | |
make dependencies build_production |