-
Notifications
You must be signed in to change notification settings - Fork 83
37 lines (34 loc) · 972 Bytes
/
build.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
name: build
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
container:
image: ruby:3.2.1
services:
postgres:
image: postgres:15
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- run: gem install bundler
- run: bundle install --jobs 4 --retry 3
- run: bundle exec rake
env:
DATABASE_URL: postgres://postgres@postgres/postgres
publish:
needs: test
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: hakanensari/frankfurter
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tag_names: true