@@ -5,7 +5,7 @@ for Open Source repositories. This document contains information on making it
5
5
work well for [ Go] ( https://github.com/features/actions ) . See them [ in
6
6
action] ( https://github.com/mvdan/github-actions-golang/actions ) :
7
7
8
- ```
8
+ ``` yaml
9
9
$ cat .github/workflows/test.yml
10
10
on : [push, pull_request]
11
11
name : Test
@@ -50,7 +50,7 @@ They can be set up via `env` for an [entire
50
50
workflow](https://help.github.com/en/articles/workflow-syntax-for-github-actions#env),
51
51
a job, or for each step :
52
52
53
- ```
53
+ ` ` ` yaml
54
54
env:
55
55
GOPROXY: "https://proxy.company.com"
56
56
jobs:
@@ -67,7 +67,7 @@ to persist Go's module download and build caches.
67
67
You can use `if` conditionals, using their [custom expression
68
68
language](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions) :
69
69
70
- ```
70
+ ` ` ` yaml
71
71
- name: Run end-to-end tests on Linux
72
72
if: github.event_name == 'push' && matrix.platform == 'ubuntu-latest'
73
73
run: go run ./endtoend
@@ -82,7 +82,7 @@ jobs](https://help.github.com/en/articles/workflow-syntax-for-github-actions#exa
82
82
83
83
# ### How do I run multiline scripts?
84
84
85
- ```
85
+ ` ` ` yaml
86
86
- name: Series of commands
87
87
run: |
88
88
go test ./...
@@ -101,7 +101,7 @@ Follow [these steps](https://help.github.com/en/articles/virtual-environments-fo
101
101
to set up the secret in the repo's settings. After adding a secret like
102
102
`FOO_SECRET`, use it on a step as follows :
103
103
104
- ```
104
+ ` ` ` yaml
105
105
- name: Command that requires secret
106
106
run: some-command
107
107
env:
@@ -136,7 +136,7 @@ Use `sudo apt`, making sure to only run the step on Linux:
136
136
137
137
Declare GOPATH and clone inside it :
138
138
139
- ` ` `
139
+ ` ` ` yaml
140
140
jobs:
141
141
test-gopath:
142
142
env:
@@ -173,7 +173,7 @@ paths like `$(go env GOPATH)/bin/program`.
173
173
your plaintext `testdata` files on Windows. To work around this, set up the
174
174
following `.gitattributes` :
175
175
176
- ` ` `
176
+ ` ` ` gitattributes
177
177
* -text
178
178
` ` `
179
179
@@ -192,9 +192,9 @@ manually:
192
192
it. Note that case sensitivity doesn't matter, and that `os.Open` should still
193
193
work; but some programs not treaing short names might break.
194
194
195
- ```
196
- $ echo %USERPROFILE% # i.e. $HOME
195
+ ` ` ` cmd
196
+ > echo %USERPROFILE%
197
197
C:\Users\run neradmin
198
- $ echo %TEMP% # a shortened version of $HOME/AppData/Local/Temp
198
+ > echo %TEMP%
199
199
C:\Users\RUN NER~1\A ppData\L ocal\T emp
200
200
` ` `
0 commit comments