Skip to content

Commit dbd969a

Browse files
committed
ci: Copy workflows from Tap.
1 parent 66e06fb commit dbd969a

5 files changed

Lines changed: 116 additions & 38 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "docker: Build and push ghcr.io/zeuswpi/tab:latest"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency:
9+
group: docker-master
10+
cancel-in-progress: true
11+
12+
jobs:
13+
docker-master:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- uses: docker/setup-buildx-action@v3
19+
20+
- uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ github.token }}
25+
26+
- uses: docker/build-push-action@v6
27+
with:
28+
context: .
29+
file: Dockerfile.production
30+
push: true
31+
tags: |
32+
ghcr.io/zeuswpi/tab:latest
33+
ghcr.io/zeuswpi/tab:latest-${{ github.sha }}

.github/workflows/docker-pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "docker: Build and push ghcr.io/zeuswpi/tab:pr-[number]"
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: docker-pr-${{ github.ref_name }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
docker-pr:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- uses: docker/setup-buildx-action@v3
17+
18+
- uses: docker/login-action@v3
19+
with:
20+
registry: ghcr.io
21+
username: ${{ github.actor }}
22+
password: ${{ github.token }}
23+
24+
- uses: docker/build-push-action@v6
25+
with:
26+
context: .
27+
file: Dockerfile.production
28+
push: true
29+
tags: |
30+
ghcr.io/zeuswpi/tab:pr-${{ github.event.pull_request.number }}
31+
ghcr.io/zeuswpi/tab:pr-${{ github.event.pull_request.number }}-${{ github.sha }}

.github/workflows/ruby-lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "ruby: lint"
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
ruby-lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v6
12+
13+
- name: "Install the Ruby version in .ruby-version"
14+
uses: ruby/setup-ruby@v1
15+
with:
16+
bundler-cache: true
17+
18+
- name: "Run rubocop"
19+
env:
20+
RAILS_ENV: test
21+
run: |
22+
bundle exec rubocop

.github/workflows/ruby-test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "ruby: test"
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
ruby-test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v6
12+
13+
- name: "Install the Ruby version in .ruby-version"
14+
uses: ruby/setup-ruby@v1
15+
with:
16+
bundler-cache: true
17+
18+
- name: "Initialize a test database"
19+
env:
20+
RAILS_ENV: test
21+
run: |
22+
bundle exec rake db:create
23+
bundle exec rake db:schema:load
24+
25+
- name: "Run rake"
26+
env:
27+
RAILS_ENV: test
28+
COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
29+
run: |
30+
bundle exec rake

.github/workflows/ruby.yml

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

0 commit comments

Comments
 (0)