-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (46 loc) · 1.32 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Push
on:
push:
branches:
- master
- develop
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- 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@v3
- name: Building docker image
uses: docker/build-push-action@v5
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