Skip to content

Commit

Permalink
init action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
flycash committed Dec 9, 2021
1 parent 1856740 commit 508a089
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on: [push]

jobs:
hello_world_job:
runs-on: ubuntu-latest
name: Test gotip
steps:
- uses: actions/checkout@v2
- id: test
uses: ./
with:
branch: 'master'
Empty file added .gitignore
Empty file.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# gotip-action
It's a Github action responsible for setup gotip environment.

it only accepts one parameter:
```yml
with:
branch: 'master'
```
30 changes: 30 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Setup Gotip'
description: 'install gotip'
inputs:
branch: # branch
description: 'the branch you wish to install'
required: false
default: 'master'
runs:
using: "composite"
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: latest
- name: Install gotip
run: go install golang.org/dl/gotip@latest
shell: bash
- name: Download gotip
run: gotip download ${{ inputs.branch }}
shell: bash
- name: Output
run: gotip env
shell: bash
branding:
icon: star
color: green

0 comments on commit 508a089

Please sign in to comment.