pr-test #1

Open
cpickett wants to merge 9 commits from pr-test into main

View File

@ -1,11 +1,26 @@
name: Gitea Actions Demo name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push] on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs: jobs:
Explore-Gitea-Actions: Explore-Gitea-Actions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: 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 "🎉 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 "🐧 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 }}." - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
@ -21,5 +36,9 @@ jobs:
run: echo "${{ github.event.commits[0].author.name }}" run: echo "${{ github.event.commits[0].author.name }}"
- name: commits[0] author email - name: commits[0] author email
run: echo "${{ github.event.commits[0].author.email }}" run: echo "${{ github.event.commits[0].author.email }}"
- name: head user login - name: head_commit author email
run: echo "${{ github.event.head.user.login }}" run: echo "${{ github.event.head_commit.author.email }}"
- name: event sender
run: echo "${{ github.event.sender.email }}"
- name: script email
run: echo ${{ steps.get-mail.outputs.result }}