Compare commits

...

8 commits
latest ... main

Author SHA1 Message Date
Jo
31d42c8bbb [routes] modify comment 2024-02-21 00:13:40 +01:00
Jo
022935f14c [workflows] rename .gitea to .forgejo, modify .gitignore 2024-02-21 00:11:09 +01:00
Jo
123fce455b fix: REPO_DOMAIN -> secrets.REPO_DOMAIN
All checks were successful
Build and push Docker image / build-and-push (push) Successful in 3m46s
2024-01-08 00:41:28 +00:00
Jo
e372802a15 refactor: require REPO_DOMAIN in build workflow to be manually set using git secrets
Some checks failed
Build and push Docker image / build-and-push (push) Has been cancelled
2024-01-08 00:37:47 +00:00
Jo
d7841543cf fix: ignore release title in build for now
All checks were successful
Build and push Docker image / build-and-push (push) Successful in 45s
2023-11-26 01:44:24 +01:00
Jo
2e99463306 fix: update release section in build process (for real, hopefully)
All checks were successful
Build and push Docker image / build-and-push (push) Successful in 44s
2023-11-26 01:37:16 +01:00
Jo
8c00fc9c80 fix: update release section in build process
All checks were successful
Build and push Docker image / build-and-push (push) Successful in 46s
2023-11-26 01:34:18 +01:00
Jo
f1cf5da3bc fix: update release section in build process
All checks were successful
Build and push Docker image / build-and-push (push) Successful in 43s
2023-11-26 01:31:31 +01:00
3 changed files with 11 additions and 9 deletions

View file

@ -6,10 +6,11 @@ on:
- main
# Secrets you have to set up for this to work:
# REPO_DOMAIN: The domain of your gitea instance (eg. https://git.cool.dev)
# REPO_TOKEN: A gitea access token for the repo
# REGISTRY_USERNAME/PASSWORD: The username and password for the docker registry of choice
env:
DOCKER_REPO: git.jo-dev.xyz/jo
DOCKER_REPO: ${{ secrets.REPO_DOMAIN }}/jo
DOCKER_TAG: latest
GITEA_REPO: jo/expresstemplate
GITEA_TOKEN: ${{ secrets.REPO_TOKEN }}
@ -36,21 +37,19 @@ jobs:
- name: Login to Docker registry
uses: docker/login-action@v1
with:
registry: git.jo-dev.xyz
registry: ${{ secrets.REPO_DOMAIN }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build Docker image
run: |
docker build -t ${DOCKER_REPO}:${DOCKER_TAG} .
docker tag ${DOCKER_REPO}:${DOCKER_TAG} git.jo-dev.xyz/${GITEA_REPO}:${DOCKER_TAG}
docker tag ${DOCKER_REPO}:${DOCKER_TAG} ${{ secrets.REPO_DOMAIN }}/${GITEA_REPO}:${DOCKER_TAG}
- name: Push Docker image to Gitea package
run: |
docker push git.jo-dev.xyz/${GITEA_REPO}:${DOCKER_TAG}
docker push ${{ secrets.REPO_DOMAIN }}/${GITEA_REPO}:${DOCKER_TAG}
curl -X POST -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"tag_name": "'"${DOCKER_TAG}"'"}' \
-d '{"name": "'"${CURRENT_DATE}"'"}' \
-d '{"prerelease": false}' \
https://git.jo-dev.xyz/api/v1/repos/${GITEA_REPO}/releases
https://${{ secrets.REPO_DOMAIN }}/api/v1/repos/${GITEA_REPO}/releases

5
.gitignore vendored
View file

@ -3,4 +3,7 @@ node_modules
# Config files
config/config.json
.env
.env
# Docker
docker-compose.yml

View file

@ -2,7 +2,7 @@ const express = require("express");
const router = express.Router();
router.get("/", (req, res) => {
// API stuff goes here
// API stuff goes here :3
});
module.exports = router;