Compare commits

..

No commits in common. "main" and "latest" have entirely different histories.
main ... latest

3 changed files with 9 additions and 11 deletions

View file

@ -6,11 +6,10 @@ 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: ${{ secrets.REPO_DOMAIN }}/jo
DOCKER_REPO: git.jo-dev.xyz/jo
DOCKER_TAG: latest
GITEA_REPO: jo/expresstemplate
GITEA_TOKEN: ${{ secrets.REPO_TOKEN }}
@ -37,19 +36,21 @@ jobs:
- name: Login to Docker registry
uses: docker/login-action@v1
with:
registry: ${{ secrets.REPO_DOMAIN }}
registry: git.jo-dev.xyz
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} ${{ secrets.REPO_DOMAIN }}/${GITEA_REPO}:${DOCKER_TAG}
docker tag ${DOCKER_REPO}:${DOCKER_TAG} git.jo-dev.xyz/${GITEA_REPO}:${DOCKER_TAG}
- name: Push Docker image to Gitea package
run: |
docker push ${{ secrets.REPO_DOMAIN }}/${GITEA_REPO}:${DOCKER_TAG}
docker push git.jo-dev.xyz/${GITEA_REPO}:${DOCKER_TAG}
curl -X POST -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"tag_name": "'"${DOCKER_TAG}"'"}' \
https://${{ secrets.REPO_DOMAIN }}/api/v1/repos/${GITEA_REPO}/releases
-d '{"name": "'"${CURRENT_DATE}"'"}' \
-d '{"prerelease": false}' \
https://git.jo-dev.xyz/api/v1/repos/${GITEA_REPO}/releases

5
.gitignore vendored
View file

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

View file

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