This commit is contained in:
16
.gitea/workflows/push_to_main.yaml
Normal file
16
.gitea/workflows/push_to_main.yaml
Normal file
@@ -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
|
||||||
8
action.sh
Normal file
8
action.sh
Normal file
@@ -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
|
||||||
24
action.yaml
Normal file
24
action.yaml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user