Skip to content

Commit ef29c49

Browse files
authored
Merge pull request #1 from appuio/cicd
Modernize deployment
2 parents 437de79 + 96a3883 commit ef29c49

File tree

7 files changed

+129
-10
lines changed

7 files changed

+129
-10
lines changed

.github/changelog-configuration.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"pr_template": "- ${{TITLE}} (#${{NUMBER}})",
3+
"categories": [
4+
{
5+
"title": "## 🚀 Features",
6+
"labels": ["enhancement"]
7+
},
8+
{
9+
"title": "## 🛠️ Minor Changes",
10+
"labels": ["change"]
11+
},
12+
{
13+
"title": "## 🔎 Breaking Changes",
14+
"labels": ["breaking"]
15+
},
16+
{
17+
"title": "## 🐛 Fixes",
18+
"labels": ["bug"]
19+
},
20+
{
21+
"title": "## 📄 Documentation",
22+
"labels": ["documentation"]
23+
},
24+
{
25+
"title": "## 🔗 Dependency Updates",
26+
"labels": ["dependency"]
27+
}
28+
],
29+
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}"
30+
}

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test
2+
3+
on:
4+
pull_request: {}
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Docker meta
13+
id: meta
14+
uses: docker/metadata-action@v3
15+
with:
16+
images: ghcr.io/${{ github.repository }}
17+
18+
- name: Build image
19+
uses: docker/build-push-action@v2
20+
with:
21+
tags: ${{ steps.meta.outputs.tags }}
22+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
env:
9+
REGISTRY_URL: ghcr.io
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v3
22+
with:
23+
images: ${{ env.REGISTRY_URL }}/${{ github.repository }}
24+
25+
- name: Docker login
26+
uses: docker/login-action@v1
27+
with:
28+
registry: ${{ env.REGISTRY_URL }}
29+
username: ${{ github.repository_owner }}
30+
password: ${{ github.token }}
31+
32+
- name: Build image
33+
uses: docker/build-push-action@v2
34+
with:
35+
push: true
36+
tags: ${{ steps.meta.outputs.tags }}
37+
labels: ${{ steps.meta.outputs.labels }}
38+
39+
- name: Build changelog from PRs with labels
40+
id: build_changelog
41+
uses: mikepenz/release-changelog-builder-action@v2
42+
with:
43+
configuration: ".github/changelog-configuration.json"
44+
# PreReleases still get a changelog, but the next full release gets a diff since the last full release,
45+
# combining possible changelogs of all previous PreReleases in between.
46+
# PreReleases show a partial changelog since last PreRelease.
47+
ignorePreReleases: "${{ !contains(github.ref, '-rc') }}"
48+
env:
49+
GITHUB_TOKEN: ${{ github.token }}
50+
51+
- name: Create Release
52+
uses: ncipollo/release-action@v1
53+
with:
54+
body: ${{steps.build_changelog.outputs.changelog}}
55+
prerelease: "${{ contains(github.ref, '-rc') }}"
56+
# Ensure target branch for release is "master"
57+
commit: master
58+
token: ${{ github.token }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ lib-cov
66
*.out
77
*.pid
88
*.gz
9-
.*
109
*.sqlite
1110
pids
1211
logs

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
FROM node:lts-alpine3.10
1+
FROM docker.io/library/node:lts-alpine
22

33
WORKDIR /usr/src/app
44

5+
ENV \
6+
NODE_ENV=production \
7+
PORT=3000 \
8+
HOST=0.0.0.0
9+
10+
CMD [ "npm", "start" ]
11+
512
COPY package*.json ./
613

714
RUN npm i --only=production
815

916
# Bundle app source
1017
COPY . .
11-
12-
ENV NODE_ENV=production
13-
ENV PORT=3000
14-
15-
EXPOSE 3000
16-
CMD [ "npm", "start" ]

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"name": "netlify-cms-github-oauth-provider",
3-
"version": "1.0.0",
43
"engines": {
54
"node": ">=7.x"
65
},
76
"description": "netlify oauth github client sending token in form as netlify service itself",
8-
"repository": "https://github.com/vencax/netlify-cms-github-oauth-provider",
7+
"repository": "https://github.com/appuio/netlify-cms-github-oauth-provider",
98
"main": "index.js",
109
"scripts": {
1110
"test": "echo \"Error: no test specified\" && exit 1",

renovate.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":gitSignOff",
5+
":disableDependencyDashboard"
6+
],
7+
"labels": [
8+
"dependency"
9+
]
10+
}

0 commit comments

Comments
 (0)