Files
ansible-repo/.gitea/workflows/act.yaml
hogweed1 690e248bc6
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s
add sdr-slut
2025-11-16 20:08:26 +10:00

87 lines
3.1 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: linux-amd64
#defaults:
# run:
# shell: bash
steps:
- name: common-setup-just-created
run: |
echo "Current working directory:"
pwd
echo "Files in workspace:"
ls -lsa
# Example: Create a simple file
echo "Hello, Gitea Runner!" > output.txt
cat output.txt
shell: bash
# - name: Checkout repository manually using bash
# run: |
# # Ensure the workspace directory is clean and navigate into it
# # GITHUB_WORKSPACE is an environment variable set by the runner
# cd $GITHUB_WORKSPACE
# # Authenticate using the GITEA_TOKEN (managed by Gitea Actions)
# # GITHUB_SERVER_URL and GITHUB_REPOSITORY are also standard env vars
# git clone --depth=1 https://${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
# # Optional: checkout a specific pull request head if it's a PR event
# # Note: Gitea uses refs/pull/:prNumber/head instead of merge commits for PRs
# if [ "${{ github.event_name }}" = "pull_request" ]; then
# git checkout ${{ github.event.pull_request.head.sha }}
# fi
# - name: Check system info using bash
# run: |
# echo "Running on the host machine"
# uname -a
# which bash
# bash --version
# - name: List files in the workspace
# run: ls -lsa
# - name: Run a simple bash script
# run: |
# echo "Hello from Gitea Actions!"
# mkdir -p my_output
# echo "This was created by a workflow running on the host." > my_output/output.txt
# shell: bash
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Check system info using bash
# run: |
# echo "Running on the host machine"
# uname -a
# which bash
# bash --version
# - name: List files in the workspace
# run: ls -lsa
# - name: Run a simple bash script
# run: |
# echo "Hello from Gitea Actions!"
# mkdir -p my_output
# echo "This was created by a workflow running on the host." > my_output/output.txt
# shell: bash
# - 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 hosted by Gitea!"
# - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
# - name: Check out repository code
# uses: actions/checkout@v4
# - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
# - run: echo "🖥️ The workflow is now ready to test your code on the runner."
# - name: List files in the repository
# run: |
# ls ${{ gitea.workspace }}
# - run: echo "🍏 This job's status is ${{ job.status }}."