Files
actions-test/.gitea/workflows/demo.yaml
Parnic 78876a9aa6
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (pull_request) Successful in 8s
Try a script?
2025-03-03 11:53:04 -06:00

59 lines
2.4 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
id: get-mail
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
return (await github.rest.users.getByUsername({
username: ${{ tojson(github.event.sender.login) }}
})).data.email;
result-encoding: string
- 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 }}."
- name: commits[0] author name
run: echo "${{ github.event.commits[0].author.name }}"
- name: commits[0] author email
run: echo "${{ github.event.commits[0].author.email }}"
- name: head_commit author email
run: echo "${{ github.event.head_commit.author.email }}"
- name: user email
run: echo "${{ github.event.user.email}}"
- name: pr commits[0] email
run: echo "${{ github.event.pull_request.commits[0].author.email}}"
- name: pr head_commit email
run: echo "${{ github.event.pull_request.head.user.email}}"
- name: pr user email
run: echo "${{ github.event.pull_request.user.email}}"
- name: pr user login
run: echo "${{ github.event.pull_request.user.email}}"
- name: pr author email
run: echo "${{ github.event.pull_request.author.email}}"
- name: head user login
run: echo "${{ github.event.head.user.login }}"
- name: event sender
run: echo "${{ github.event.sender.email }}"
- name: script email
run: echo ${{ steps.get-mail.outputs.result }}