This commit is contained in:
dm 2024-08-12 16:16:43 +08:00
parent b175346846
commit 476ba36732
1 changed files with 18 additions and 15 deletions

View File

@ -1,16 +1,19 @@
name: 'Simple Go Action'
description: 'A simple Gitea action written in go'
name: 'Test Go Action'
on: [push]
runs-on: ps_runner_labels
inputs:
username:
description: 'The username to print'
required: true
outputs:
time:
description: 'The time when the action was called'
runs:
using: 'go'
main: 'main.go'
pre: "pre/pre.go"
post: "post/post.go"
jobs:
use-go-action:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Use Go Action
id: use-go-action
uses: <action-url>
with:
username: foo
- name: Print Output
run: echo 'output time is ${{ steps.use-go-action.outputs.time }}'