-
Notifications
You must be signed in to change notification settings - Fork 8
63 lines (50 loc) · 1.89 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [bionic, focal, jammy]
arch: ["amd64", "arm64"]
location: ["", "-usr-local"]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.2"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Install gems
run: bundle install
- name: Build package
run: make -f Makefile.docker container-${{ matrix.os }}${{ matrix.location }} package-${{ matrix.os }}${{ matrix.location }} ARCH=${{ matrix.arch }}
- name: Setup docker credentials
run: echo ${{ secrets.DOCKER_TOKEN }} | docker login -u stkaes --password-stdin
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
- name: Push container to docker registry
run: make -f Makefile.docker push-${{ matrix.os }}${{ matrix.location }} ARCH=${{ matrix.arch }}
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
- name: Setup SSH credentials
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/railsexpress.key
chmod 600 ~/.ssh/railsexpress.key
cat >>~/.ssh/config <<END
Host railsexpress.de
HostName railsexpress.de
User uploader
IdentityFile ~/.ssh/railsexpress.key
StrictHostKeyChecking no
END
env:
SSH_KEY: ${{ secrets.RAILSEXPRESS_SSH_KEY }}
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
- name: Upload the package
run: make -f Makefile.docker publish-${{ matrix.os }}${{ matrix.location }} ARCH=${{ matrix.arch }}
if: github.event_name == 'push' && github.ref == 'refs/heads/master'