Skip to content

Commit 7e1a290

Browse files
committed
update
1 parent f9e68dd commit 7e1a290

File tree

3 files changed

+62
-62
lines changed

3 files changed

+62
-62
lines changed

.github/workflows/docker.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Docker
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
- uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: '3.3'
25+
bundler-cache: true
26+
27+
- run: |
28+
make setup
29+
bin/rails assets:precompile
30+
make test
31+
32+
docker:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
if: ${{ github.event_name == 'push' }}
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- uses: docker/setup-buildx-action@v3
41+
42+
- name: Log in to GitHub Container Registry
43+
uses: docker/login-action@v3
44+
with:
45+
registry: ghcr.io
46+
username: ${{ github.actor }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- name: Build and push
50+
uses: docker/build-push-action@v6
51+
with:
52+
context: .
53+
push: true
54+
cache-from: ghcr.io/${{ github.repository }}:latest
55+
cache-to: type=inline
56+
tags: ghcr.io/${{ github.repository }}:latest

.github/workflows/main.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Main
2+
name: Render
33

44
on:
55
pull_request:
@@ -15,18 +15,19 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18+
1819
- uses: actions/setup-node@v4
1920
with:
2021
node-version: '20'
2122
cache: 'npm'
23+
2224
- uses: ruby/setup-ruby@v1
2325
with:
2426
ruby-version: '3.3'
2527
bundler-cache: true
2628

2729
- run: |
2830
make setup
29-
bin/rails assets:precompile
3031
make test
3132
3233
deploy:
@@ -37,20 +38,6 @@ jobs:
3738
steps:
3839
- uses: actions/checkout@v4
3940

40-
- uses: docker/setup-buildx-action@v3
41-
42-
- name: Log in to GitHub Container Registry
43-
uses: docker/login-action@v3
44-
with:
45-
registry: ghcr.io
46-
username: ${{ github.actor }}
47-
password: ${{ secrets.GITHUB_TOKEN }}
48-
49-
- name: Build and push
50-
uses: docker/build-push-action@v6
51-
with:
52-
context: .
53-
push: true
54-
cache-from: ghcr.io/${{ github.repository }}:latest
55-
cache-to: type=inline
56-
tags: ghcr.io/${{ github.repository }}:latest
41+
- name: Deploy
42+
run: |
43+
curl ${{ secrets.RENDER_DEPLOY_HOOK_URL }}

.github/workflows/render.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)