From dd2e6e4083d0c8354a23bc187fb2571c6f50005b Mon Sep 17 00:00:00 2001 From: Bryce Thorup Date: Thu, 22 Jan 2026 09:58:38 -0700 Subject: [PATCH] v1 --- .gitea/workflows/push_to_main.yaml | 16 ++++++++++++++++ action.sh | 8 ++++++++ action.yaml | 24 ++++++++++++++++++++++++ readme.md | 3 +++ 4 files changed, 51 insertions(+) create mode 100644 .gitea/workflows/push_to_main.yaml create mode 100644 action.sh create mode 100644 action.yaml create mode 100644 readme.md diff --git a/.gitea/workflows/push_to_main.yaml b/.gitea/workflows/push_to_main.yaml new file mode 100644 index 0000000..d4b219c --- /dev/null +++ b/.gitea/workflows/push_to_main.yaml @@ -0,0 +1,16 @@ +name: Push to main + +on: + push: + branches: [main] + +jobs: + Reset-Version-Tag: + runs-on: debian-bullseye + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: git tag -d v1 || true + - run: git push --delete origin v1 || true + - run: git tag v1 + - run: git push --tags diff --git a/action.sh b/action.sh new file mode 100644 index 0000000..2398043 --- /dev/null +++ b/action.sh @@ -0,0 +1,8 @@ +### INSTALL DOCKER +curl -fsSL https://get.docker.com -o get-docker.sh +sh get-docker.sh + +### LOGIN TO CONTAINER REPO +echo $INPUT_LOGIN_PASS | docker login $INPUT_CONTAINER_DOMAIN -u $INPUT_LOGIN_USER --password-stdin +docker build -t $INPUT_CONTAINER_DOMAIN/$INPUT_CONTAINER_NAME:$INPUT_CONTAINER_TAG --no-cache . +docker push $INPUT_CONTAINER_DOMAIN/$INPUT_CONTAINER_NAME:$INPUT_CONTAINER_TAG \ No newline at end of file diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..00dc4b2 --- /dev/null +++ b/action.yaml @@ -0,0 +1,24 @@ +name: container-publish +description: "publishes latest version tag to a container repository" +author: "Bryce Thorup" +inputs: + login_user: + description: container repo login username + required: true + login_pass: + description: container repo login password + required: true + container_domain: + description: container repo domain (repo.something.com) + required: true + container_name: + description: container name (org/package) + required: true + container_tag: + description: container tag (latest) + required: true +runs: + using: "composite" + steps: + - run: $GITHUB_ACTION_PATH/action.sh + shell: bash diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..062f3ca --- /dev/null +++ b/readme.md @@ -0,0 +1,3 @@ +# container_publish + +gitea action for publishing the latest changes to a container repository