Skip to content

Commit 092c99c

Browse files
authored
Create a Tornjak image v1.4.0 (#286)
2 parents 066b8f8 + 327cb0b commit 092c99c

40 files changed

+2280
-1316
lines changed

.github/dependabot.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
# Workflow files stored in the
10+
# default location of `.github/workflows`
11+
directory: "/"
12+
schedule:
13+
interval: "daily"
14+
open-pull-requests-limit: 5

.github/workflows/ci.yaml

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,47 @@ jobs:
44
tornjak-build:
55
runs-on: ubuntu-latest
66
steps:
7-
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
8-
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
9-
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
7+
- name: Show trigger info
8+
run: |
9+
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
10+
# Workflow job info
11+
12+
- 🎉 The job was automatically triggered by a ${{ github.event_name }} event.
13+
- 🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!
14+
- 🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}.
15+
EOF
16+
1017
- name: Check out repository code
11-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3.5.3
19+
1220
- name: Install Golang
13-
uses: actions/setup-go@v3
21+
uses: actions/setup-go@v4.0.1
1422
with:
15-
go-version: '1.17'
16-
- uses: actions/setup-node@v2
23+
go-version-file: go.mod
24+
check-latest: true
25+
cache: true
26+
27+
- uses: actions/setup-node@v3.7.0
1728
with:
18-
node-version: '15'
29+
node-version: '18'
30+
31+
- name: Download modules
32+
run: go mod download
33+
1934
- name: golangci-lint
20-
uses: golangci/golangci-lint-action@v3
35+
uses: golangci/golangci-lint-action@v3.6.0
2136
with:
22-
version: v1.29
23-
args: --timeout 5m
24-
- name: Run make all
25-
run: make all
26-
- run: echo "🍏 This job's status is ${{ job.status }}."
37+
version: v1.53
38+
args: --timeout 7m
39+
40+
- name: Build binaries
41+
run: make binaries
42+
43+
- name: Build images
44+
run: make images
45+
46+
- name: Print job result
47+
run: |
48+
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
49+
- 🍏 This job's status is ${{ job.status }}.
50+
EOF

.github/workflows/master-build.yaml

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,49 @@ on:
33
push:
44
branches:
55
- main
6-
- v1.2
7-
- v1.3
6+
- v1.4
87
jobs:
98
tornjak-build:
109
runs-on: ubuntu-latest
1110
steps:
12-
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
13-
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
14-
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
11+
- name: Show trigger info
12+
run: |
13+
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
14+
# Workflow job info
15+
16+
- 🎉 The job was automatically triggered by a ${{ github.event_name }} event.
17+
- 🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!
18+
- 🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}.
19+
EOF
20+
1521
- name: Check out repository code
16-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3.5.3
23+
1724
- name: Install Golang
18-
uses: actions/setup-go@v3
25+
uses: actions/setup-go@v4.0.1
1926
with:
20-
go-version: '1.17'
21-
- uses: actions/setup-node@v3
27+
go-version-file: go.mod
28+
check-latest: true
29+
cache: true
30+
31+
- name: Download modules
32+
run: go mod download
33+
34+
- uses: actions/setup-node@v3.7.0
2235
with:
2336
node-version: '18'
37+
38+
- name: Download modules
39+
run: go mod download
40+
2441
- name: golangci-lint
25-
uses: golangci/golangci-lint-action@v3
42+
uses: golangci/golangci-lint-action@v3.6.0
2643
with:
27-
version: v1.29
28-
args: --timeout 5m
44+
version: v1.53
45+
args: --timeout 7m
46+
2947
- name: Log in to GHCR.io
30-
uses: docker/login-action@v1
48+
uses: docker/login-action@v2.2.0
3149
with:
3250
registry: ghcr.io
3351
username: ${{ github.repository_owner }}
@@ -36,16 +54,25 @@ jobs:
3654
# set repo and GITHUB SHA
3755
- name: Set github commit id
3856
run: echo "GITHUB_SHA=$GITHUB_SHA" >> $GITHUB_ENV
57+
3958
- name: Set release repo
4059
run: echo "REPO=ghcr.io/${{ github.repository_owner }}" >> $GITHUB_ENV
4160

4261
# build and push images tagged with GITHUB_SHA, version, and latest
4362
- name: Build and push tornjak backend image
44-
run: make container-backend-push
63+
run: make release-tornjak-backend
64+
4565
- name: Build and push tornjak frontend image
46-
run: make container-frontend-push
66+
run: make release-tornjak-frontend
67+
4768
- name: Build and push tornjak image (frontend+backend)
48-
run: make container-tornjak-push
69+
run: make release-tornjak
70+
4971
- name: Build and push tornjak manager image
50-
run: make container-manager-push
51-
- run: echo "🍏 This job's status is ${{ job.status }}."
72+
run: make release-tornjak-manager
73+
74+
- name: Print job result
75+
run: |
76+
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
77+
- 🍏 This job's status is ${{ job.status }}.
78+
EOF

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ Building Tornjak manually can be done with the Makefile. Notable make targets fo
3030
- `make bin/tornjak-backend`: makes the Go executable of the Tornjak backend
3131
- `make bin/tornjak-manager`: makes the Go executable of the Tornjak manager
3232
- `make frontend-local-build`: makes the optimized ReactJS app locally for the Tornjak frontend. Uses environment variable configuration as in tornjak-frontend/.env
33-
- `make container-backend`: containerizes Go executable of the Tornjak backend
34-
- `make container-manager`:containerizes Go executable of the Tornjak manager
35-
- `make container-frontend`: containerizes React JS app for the Tornjak frontend
36-
- `make container-tornjak`: containerizes Tornjak backend with Tornjak frontend
33+
- `make image-tornjak-backend`: containerizes Go executable of the Tornjak backend
34+
- `make image-tornjak-manager`:containerizes Go executable of the Tornjak manager
35+
- `make image-tornjak-frontend`: containerizes React JS app for the Tornjak frontend
36+
- `make image-tornjak`: containerizes Tornjak backend with Tornjak frontend
3737

3838
For usage instructions of the containers, please see our [USAGE document](./USAGE.md) to get started.
3939

Dockerfile.add-backend

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

Dockerfile.frontend-container

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
## Build stage
2-
FROM node:16-alpine3.14 AS build
2+
FROM node:18-alpine3.14 AS build
33
WORKDIR /usr/src/app
44
COPY tornjak-frontend .
55
RUN npm install && \
66
npm run build
77

88
## Runtime stage
9-
FROM node:16-alpine3.14 AS runtime
9+
FROM node:18-alpine3.14 AS runtime
1010
WORKDIR /usr/src/app
1111
COPY --from=build /usr/src/app/build ./build
1212
COPY --from=build /usr/src/app/.env.prod .

0 commit comments

Comments
 (0)