Skip to content

Instantly share code, notes, and snippets.

@parjun8840
Created January 9, 2023 00:15
Show Gist options
  • Save parjun8840/1dc5ea089d4293b0326163505c005239 to your computer and use it in GitHub Desktop.
Save parjun8840/1dc5ea089d4293b0326163505c005239 to your computer and use it in GitHub Desktop.
using official action "checkout" and executing go code
#.github/workflows/gorun.yaml
name: Gocode Actions demo
run-name: User- ${{ github.actor }}, building & running go application 🚀
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
#Using an existing official action from- https://github.com/actions/checkout
- name: Checking out the code
uses: actions/checkout@v3
#Writing a multiline script to show verify runner settings
- name: listing host, pwd & files
run: |
hostname
pwd
ls
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run go code
id: gorunid
run: go run name.go
- name: Display the Go version
run: go version
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment