Some checks failed
Gitea Actions Demo / build-and-push (push) Failing after 7s
37 lines
1.0 KiB
YAML
37 lines
1.0 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: 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: |
|
|
cat /etc/hosts
|
|
# 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 }} |