added in gitea actions
Some checks failed
Gitea Actions Demo / build-and-push (push) Failing after 11s
Some checks failed
Gitea Actions Demo / build-and-push (push) Failing after 11s
This commit is contained in:
@@ -1,13 +1,36 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing Gitea Actions 🚀
|
||||
on: [push]
|
||||
run-name: ${{ gitea.actor }} is building the chore app 🚀
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- next
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server!"
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code."
|
||||
|
||||
- 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 }}
|
||||
Reference in New Issue
Block a user