generated from snek-functions/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 43b0026
Showing
21 changed files
with
769 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
.git | ||
node_modules | ||
*Dockerfile* | ||
yarn.lock | ||
package-lock.json | ||
|
||
# SPDX-License-Identifier: (EUPL-1.2) | ||
# Copyright © 2019-2022 snek.at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<p align="center"> | ||
<a href="https://snek.at/" target="_blank" rel="noopener noreferrer"> | ||
<img src="https://avatars2.githubusercontent.com/u/55870326?s=400" alt="SNEK Logo" height="150"> | ||
</a> | ||
</p> | ||
|
||
<h3 align="center">Official Code of Conflict</h3> | ||
|
||
## Table of contents | ||
|
||
- [Table of contents](#table-of-contents) | ||
- [Conflicts](#conflicts) | ||
|
||
## [](#conflicts)Conflicts | ||
|
||
Our development effort is a very personal process compared | ||
to "traditional" ways of developing software. Your code and ideas | ||
behind it will be carefully reviewed, often resulting in critique and | ||
criticism. The review will almost always require improvements to the | ||
code before it can be included. Know that this happens because everyone | ||
involved wants to see the best possible solution for the overall success | ||
of this project. | ||
|
||
As a reviewer of code, please strive to keep things civil and focused on | ||
the technical issues involved. We are all humans, and frustrations can | ||
be high on both sides of the process. Try to keep in mind the immortal | ||
words of Bill and Ted, "Be excellent to each other." | ||
|
||
SPDX-License-Identifier: (EUPL-1.2) | ||
Copyright © 2019-2022 snek.at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<p align="center"> | ||
<a href="https://snek.at/" target="_blank" rel="noopener noreferrer"> | ||
<img src="https://avatars2.githubusercontent.com/u/55870326?s=400&u=c6c7f06305ddc94747d474850fde7b2044f53838&v=4" alt="SNEK Logo" height="150"> | ||
</a> | ||
</p> | ||
|
||
<h3 align="center">Official Contributing Guidelines</h3> | ||
|
||
<p align="center"> | ||
A set of rules outlining the norms, rules, and responsibilities of, | ||
and or proper practices for, an individual. | ||
</p> | ||
|
||
## Table of contents | ||
|
||
- [Table of contents](#table-of-contents) | ||
- [Commits](#commits) | ||
- [Pull Requests](#pull-requests) | ||
|
||
## [](#commits)Commits | ||
|
||
- All commits may start with an [git-cz](https://github.com/streamich/git-cz) type | ||
- All commits must be written in present tense | ||
- All commits may be multiline commits | ||
- The commit headline must have a maximum of 71 chars | ||
- The commit message must have a maximum of 71 chars per line | ||
- If possible, include link to online topic as reference (Ref: ) | ||
- Detailed explanation why the commit was done | ||
- Include reference to issue if one exists | ||
- All commits must be verified | ||
- No commits, under no circumstances, should be directly pushed to master (deadly) | ||
- Each commit should only serve one purpose | ||
|
||
## [](#pull-requests)Pull Requests | ||
|
||
- Each pull request should only follow one topic | ||
- You must follow the guidelines / template | ||
- Each pull request must have at least one reviewer | ||
- Each pull request must have at least one assigned developer | ||
- Each pull request must have a label | ||
- Each pull request should be merged by the maintainer | ||
|
||
SPDX-License-Identifier: (EUPL-1.2) | ||
Copyright © 2019-2022 snek.at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
|
||
- OS: (e.g. iOS) | ||
- Browser: (e.g. chrome, safari) | ||
- Version: (e.g. 22) | ||
|
||
**Smartphone (please complete the following information):** | ||
|
||
- Device: (e.g. iPhone6) | ||
- OS: (e.g. iOS8.1) | ||
- Browser: (e.g. stock browser, safari) | ||
- Version: (e.g. 22) | ||
|
||
**Additional context** | ||
Add any other context about the problem here. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Trimmed Feature request | ||
about: Suggest a quick idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the feature or change you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
**Checklist:** | ||
|
||
<!--- Make sure your PR is documented and tested before submission. Put an `x` in all the boxes that apply: --> | ||
- [ ] Have you added an explanation of what your changes do and why you'd like them to be included? | ||
- [ ] Have you updated or added documentation for the change? | ||
- [ ] Have you tested your changes with successful results? | ||
|
||
|
||
**What is the current behavior? (link to any open issues here)** | ||
- | ||
|
||
|
||
**What is the new behavior (if this is a feature change)?** | ||
- | ||
|
||
|
||
**Other information**: | ||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: publish | ||
|
||
on: [push] | ||
env: | ||
IMAGE_NAME: template | ||
|
||
jobs: | ||
# Push image to GitHub Packages. | ||
# See also https://docs.docker.com/docker-hub/builds/ | ||
publish-container: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build image | ||
run: docker build . --file Dockerfile --tag $IMAGE_NAME | ||
|
||
- name: Log into registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
|
||
- name: Push image | ||
run: | | ||
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME | ||
# Change all uppercase to lowercase | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
# Strip git ref prefix from version | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
# Strip "v" prefix from tag name | ||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | ||
# Use Docker `latest` tag convention | ||
[ "$VERSION" == "main" ] && VERSION=latest | ||
echo IMAGE_ID=$IMAGE_ID | ||
echo VERSION=$VERSION | ||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION | ||
docker push $IMAGE_ID:$VERSION | ||
# SPDX-License-Identifier: (EUPL-1.2) | ||
# Copyright © 2019-2022 snek.at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# JavaScript / TypeScript | ||
node_modules | ||
dist | ||
yarn-error.log | ||
tsconfig.tsbuildinfo | ||
yarn.lock | ||
package-lock.json | ||
.yarn | ||
|
||
# Environment | ||
.env | ||
.env.* | ||
|
||
# snek-function | ||
.sf | ||
|
||
|
||
# SPDX-License-Identifier: (EUPL-1.2) | ||
# Copyright © 2019-2022 snek.at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"helpMessage": "\nPlease fix your commit message (and consider using http://npm.im/commitizen)\n", | ||
"types": [ | ||
"feat", | ||
"fix", | ||
"docs", | ||
"style", | ||
"refactor", | ||
"perf", | ||
"test", | ||
"chore", | ||
"revert", | ||
"WIP" | ||
], | ||
"warnOnFail": false, | ||
"autoFix": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
nodeLinker: node-modules | ||
nmHoistingLimits: workspaces | ||
|
||
enableTransparentWorkspaces: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
This Project is provided under: | ||
|
||
SPDX-License-Identifier: EUPL-1.2 | ||
|
||
Being under the terms of the European Union Public Licence version 1.2 only, | ||
according with: | ||
|
||
LICENSES/preferred/EUPL-1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM --platform=linux/amd64 node:18.8.0-alpine | ||
|
||
LABEL description="This container serves as an entry point for our future Snek Function projects." | ||
LABEL org.opencontainers.image.source="https://github.com/snek-functions/template" | ||
LABEL maintainer="[email protected]" | ||
|
||
WORKDIR /app | ||
|
||
COPY .sf/ ./.sf | ||
COPY package.json . | ||
|
||
RUN yarn install --production | ||
RUN yarn sf build | ||
|
||
CMD ["sh", "-c", "yarn sf-server"] | ||
|
||
EXPOSE 3000 | ||
|
||
# SPDX-License-Identifier: (EUPL-1.2) | ||
# Copyright © 2022 snek.at |
Oops, something went wrong.