Created
January 9, 2023 00:15
-
-
Save parjun8840/1dc5ea089d4293b0326163505c005239 to your computer and use it in GitHub Desktop.
using official action "checkout" and executing go code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#.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