7 Commits

Author SHA1 Message Date
bryce da308f8d8b updated readme 2026-04-22 10:53:30 -06:00
bryce e5f2ee9eda V2
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-03-05 07:42:01 -07:00
bryce 5453bc5d3a V2
Push to main / Reset-Version-Tag (push) Successful in 7s
2026-03-05 07:39:53 -07:00
bryce 89bf9dd69b V2
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-03-05 07:37:01 -07:00
bryce 38d3c0242d fix imports
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-03-05 07:26:00 -07:00
bryce dfad87ccf7 v2
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-03-05 07:25:00 -07:00
bryce 19dd8f0430 v2
Push to main / Reset-Version-Tag (push) Successful in 7s
2026-03-05 07:14:39 -07:00
6 changed files with 57 additions and 21 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ jobs:
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
- run: git tag -d v1 || true - run: git tag -d v2 || true
- run: git push --delete origin v1 || true - run: git push --delete origin v2 || true
- run: git tag v1 - run: git tag v2
- run: git push --tags - run: git push --tags
+23
View File
@@ -0,0 +1,23 @@
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`);
-13
View File
@@ -1,13 +0,0 @@
### 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
+1 -4
View File
@@ -14,11 +14,8 @@ inputs:
container_name: container_name:
description: container name (org/package) description: container name (org/package)
required: true required: true
container_tag:
description: container tag (latest)
required: true
runs: runs:
using: "composite" using: "composite"
steps: steps:
- run: $GITHUB_ACTION_PATH/action.sh - run: node $GITHUB_ACTION_PATH/action.js
shell: bash shell: bash
+11
View File
@@ -0,0 +1,11 @@
{
"name": "container_publish",
"version": "1.0.1",
"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"
}
+19 -1
View File
@@ -1,3 +1,21 @@
# container_publish # container_publish
gitea action for publishing the latest changes to a container repository 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`.