Files
chore/.gitea/workflows/build.yaml
Ryan Kegel a6936ce609
Some checks failed
Gitea Actions Demo / build-and-push (push) Failing after 10s
added in gitea actions
2026-01-13 13:59:34 -05:00

40 lines
1.1 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is building the chore app 🚀
on:
push:
branches:
- master
- next
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Print Hostname
run: |
hostname
- name: Determine Image Tag
id: vars
run: |
if [ "${{ gitea.ref }}" == "refs/heads/master" ]; then
echo "tag=latest" >> $GITHUB_OUTPUT
else
echo "tag=next" >> $GITHUB_OUTPUT
fi
- name: Build Docker Image
run: |
docker build -t gitea-server:3000/ryan/chore:${{ steps.vars.outputs.tag }} .
- name: Log in to Registry
run: |
# Use your Gitea credentials (secrets are safer, but this works for testing)
echo "0x013h" | docker login gitea-server:3000 -u ryan --password-stdin
- name: Push Image to Gitea Registry
run: |
docker push gitea-server:3000/ryan/chore:${{ steps.vars.outputs.tag }}