Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
bd0a84c3fa
|
|||
4eec21fdec
|
|||
78876a9aa6
|
|||
7ed22de9e4
|
|||
cfbacd197b
|
|||
89169ca747
|
|||
046fca2d27
|
|||
b5dcbc2f7f
|
|||
b6f519c30e
|
@ -1,11 +1,26 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
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 }}."
|
||||
@ -21,5 +36,9 @@ jobs:
|
||||
run: echo "${{ github.event.commits[0].author.name }}"
|
||||
- name: commits[0] author email
|
||||
run: echo "${{ github.event.commits[0].author.email }}"
|
||||
- name: head user login
|
||||
run: echo "${{ github.event.head.user.login }}"
|
||||
- name: head_commit author email
|
||||
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 }}
|
||||
|
Reference in New Issue
Block a user