Add container publishing and env-based runtime
CI / test (push) Successful in 30s
CI / publish (push) Failing after 27s

This commit is contained in:
Joe Julian
2026-03-28 15:36:52 -07:00
parent 36af73a209
commit 5f16410960
5 changed files with 103 additions and 53 deletions
+30
View File
@@ -23,3 +23,33 @@ jobs:
- name: Build
run: go build .
publish:
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Docker CLI
run: |
apt-get update
apt-get install -y docker.io
- name: Login to Gitea Registry
env:
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: |
registry_host="${GITHUB_SERVER_URL#http://}"
registry_host="${registry_host#https://}"
printf '%s' "${REGISTRY_PASSWORD}" | docker login "${registry_host}" -u "${GITHUB_REPOSITORY_OWNER}" --password-stdin
- name: Build and Push Image
run: |
registry_host="${GITHUB_SERVER_URL#http://}"
registry_host="${registry_host#https://}"
image="${registry_host}/${GITHUB_REPOSITORY}"
docker build -t "${image}:main" -t "${image}:sha-${GITHUB_SHA}" .
docker push "${image}:main"
docker push "${image}:sha-${GITHUB_SHA}"