Compare commits

3 Commits
Author SHA1 Message Date
bryce b44f15214c Merge pull request 'cleanup' (#4) from v1_clean-up into v1_main
Push to main / Reset-Version-Tag (push) Successful in 7s
Reviewed-on: #4
2026-09-23 08:02:13 -06:00
bryce 70fe6be832 cleanup 2026-09-23 08:01:43 -06:00
bryce 14dbbaf494 force lower-case values in package name
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-06-15 11:07:21 -06:00
6 changed files with 24 additions and 63 deletions

No files matched your search

+4 -4
View File
@@ -2,7 +2,7 @@ name: Push to main
on:
push:
branches: [main]
branches: [v1_main]
jobs:
Reset-Version-Tag:
@@ -10,7 +10,7 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: git tag -d v2 || true
- run: git push --delete origin v2 || true
- run: git tag v2
- run: git tag -d v1 || true
- run: git push --delete origin v1 || true
- run: git tag v1
- run: git push --tags
-28
View File
@@ -1,28 +0,0 @@
import { execSync } from "child_process";
import { readFileSync } from "fs";
const tag = JSON.parse(
readFileSync("package.json", { encoding: "utf8" }),
).version;
console.log("============= INSTALLING DOCKER ==============");
execSync("curl -fsSL https://get.docker.com -o get-docker.sh");
execSync("sh get-docker.sh");
execSync("rm get-docker.sh");
console.log("======== LOGGING IN TO CONTAINER REPO ========");
execSync(
"docker login $INPUT_CONTAINER_DOMAIN -u $INPUT_LOGIN_USER --password $INPUT_LOGIN_PASS",
);
console.log("============= BUILDING CONTAINER =============");
execSync(
`docker build -t $INPUT_CONTAINER_DOMAIN/$INPUT_CONTAINER_NAME:latest -t $INPUT_CONTAINER_DOMAIN/$INPUT_CONTAINER_NAME:${tag} --no-cache .`,
);
console.log("============= PUSHING CONTAINER ==============");
execSync(`docker push $INPUT_CONTAINER_DOMAIN/$INPUT_CONTAINER_NAME:${tag}`);
execSync(`docker push $INPUT_CONTAINER_DOMAIN/$INPUT_CONTAINER_NAME:latest`);
console.log("============= CLEANING UP =============");
execSync("docker system prune -a -f");
Executable
+15
View File
@@ -0,0 +1,15 @@
### INSTALL DOCKER
echo "get docker install script"
curl -fsSL https://get.docker.com -o get-docker.sh
echo "run docker install script"
sh get-docker.sh
### LOGIN TO CONTAINER REPO
echo "run docker login"
docker login $INPUT_CONTAINER_DOMAIN -u $INPUT_LOGIN_USER --password $INPUT_LOGIN_PASS
echo "run docker build"
docker build -t ${INPUT_CONTAINER_DOMAIN,,}/${INPUT_CONTAINER_NAME,,}:${INPUT_CONTAINER_TAG,,} --no-cache .
echo "run docker push"
docker push $INPUT_CONTAINER_DOMAIN/$INPUT_CONTAINER_NAME:$INPUT_CONTAINER_TAG
echo "run docker prune"
docker system prune -a -f
+4 -1
View File
@@ -14,8 +14,11 @@ inputs:
container_name:
description: container name (org/package)
required: true
container_tag:
description: container tag (latest)
required: true
runs:
using: "composite"
steps:
- run: node $GITHUB_ACTION_PATH/action.js
- run: $GITHUB_ACTION_PATH/action.sh
shell: bash
-11
View File
@@ -1,11 +0,0 @@
{
"name": "container_publish",
"version": "1.0.2",
"description": "gitea action for publishing the latest changes to a container repository",
"repository": {
"type": "git",
"url": "git@git.thorup.us:actions/container_publish.git"
},
"type": "module",
"main": "action.js"
}
+1 -19
View File
@@ -1,21 +1,3 @@
# container_publish
This is a Gitea action for publishing the latest changes to a container repository.
## Gitea Secrets and Variables
### (Secret) `LOGIN_PASS`
A token generated in `Settings` -> `Applications` page. Be sure to set the `Package` permission to `Read & Write`, leave all others set to `No Access`.
### (Variable) `LOGIN_USER`
The user name of the account that the `LOGIN_PASS` token was generated on.
### (Variable) `CONTAINER_DOMAIN`
The domain where the image repository is located. i.e. `git.thorup.us`.
### (Variable) `CONTAINER_NAME`
The name used to reference image. i.e. `org_name/image_name`.
gitea action for publishing the latest changes to a container repository