1 Commits

Author SHA1 Message Date
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 22 additions and 58 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ name: Push to main
on: on:
push: push:
branches: [main] branches: [v1_main]
jobs: jobs:
Reset-Version-Tag: Reset-Version-Tag:
@@ -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 v2 || true - run: git tag -d v1 || true
- run: git push --delete origin v2 || true - run: git push --delete origin v1 || true
- run: git tag v2 - run: git tag v1
- run: git push --tags - run: git push --tags
-23
View File
@@ -1,23 +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`);
Executable
+13
View File
@@ -0,0 +1,13 @@
### 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
+4 -1
View File
@@ -14,8 +14,11 @@ 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: node $GITHUB_ACTION_PATH/action.js - run: $GITHUB_ACTION_PATH/action.sh
shell: bash shell: bash
-11
View File
@@ -1,11 +0,0 @@
{
"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"
}
+1 -19
View File
@@ -1,21 +1,3 @@
# container_publish # container_publish
This is a Gitea action for publishing the latest changes to a container repository. 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`.