Skip to content

Commit 2096a2c

Browse files
Merge pull request #40 from actions/v2-proxy
v2 with proxy support
2 parents 9fbc767 + 768458b commit 2096a2c

File tree

192 files changed

+17879
-24788
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+17879
-24788
lines changed

.github/workflows/versions.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: go-versions
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- '**.md'
8+
pull_request:
9+
paths-ignore:
10+
- '**.md'
11+
jobs:
12+
run:
13+
name: Go
14+
runs-on: ${{ matrix.operating-system }}
15+
strategy:
16+
matrix:
17+
operating-system: [ubuntu-latest, windows-latest, macos-latest]
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: setup-go ^1.13.6
23+
uses: ./
24+
with:
25+
go-version: ^1.13.6
26+
27+
- name: validate version
28+
run: go version | grep "go1.13."
29+
30+
- name: setup-go 1.13
31+
uses: ./
32+
with:
33+
go-version: 1.13
34+
35+
- name: validate version
36+
run: go version | grep "go1.13."
37+
38+
- name: setup-go 1.12.9
39+
uses: ./
40+
with:
41+
go-version: 1.12.9
42+
43+
- name: validate version
44+
run: go version | grep "go1.12.9"

.github/workflows/workflow.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
name: Main workflow
2-
on: [push]
1+
name: build-test
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- '**.md'
8+
pull_request:
9+
paths-ignore:
10+
- '**.md'
311
jobs:
412
run:
513
name: Run
@@ -9,12 +17,12 @@ jobs:
917
operating-system: [ubuntu-latest, windows-latest]
1018
steps:
1119
- name: Checkout
12-
uses: actions/checkout@master
20+
uses: actions/checkout@v2
1321

14-
- name: Set Node.js 10.x
15-
uses: actions/setup-node@master
22+
- name: Setup node 12
23+
uses: actions/setup-node@v1
1624
with:
17-
version: 10.x
25+
node-version: 12
1826

1927
- name: npm install
2028
run: npm install
@@ -24,3 +32,7 @@ jobs:
2432

2533
- name: npm test
2634
run: npm test
35+
36+
- name: audit packages
37+
run: npm audit --audit-level=moderate
38+
if: matrix.operating-system == 'ubuntu-latest'

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# Explicitly not ignoring node_modules so that they are included in package downloaded by runner
2-
!node_modules/
3-
__tests__/runner/*
1+
node_modules/
2+
lib
43

54
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
65
# Logs

CONDUCT

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

README.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
11
# setup-go
22

33
<p align="left">
4-
<a href="https://github.com/actions/setup-go"><img alt="GitHub Actions status" src="https://github.com/actions/setup-go/workflows/Main%20workflow/badge.svg"></a>
4+
<a href="https://github.com/actions/setup-go/actions"><img alt="GitHub Actions status" src="https://github.com/actions/setup-go/workflows/build-test/badge.svg"></a>
5+
6+
<a href="https://github.com/actions/setup-go/actions"><img alt="versions status" src="https://github.com/actions/setup-go/workflows/go-versions/badge.svg"></a>
57
</p>
68

79
This action sets up a go environment for use in actions by:
810

911
- optionally downloading and caching a version of Go by version and adding to PATH
1012
- registering problem matchers for error output
1113

14+
# V2 Beta
15+
16+
The V2 beta offers:
17+
- Proxy Support
18+
- stable input
19+
- Bug Fixes (including issues around version matching and semver)
20+
21+
Matching by semver spec:
22+
```yaml
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-go@v2-beta
26+
with:
27+
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
28+
- run: go version
29+
```
30+
31+
Matching an unstable pre-release:
32+
```yaml
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: actions/setup-go@v2-beta
36+
with:
37+
stable: 'false'
38+
go-version: '1.14.0-rc1' # The Go version to download (if necessary) and use.
39+
- run: go version
40+
```
41+
1242
# Usage
1343
1444
See [action.yml](action.yml)
@@ -30,10 +60,10 @@ jobs:
3060
runs-on: ubuntu-16.04
3161
strategy:
3262
matrix:
33-
go: [ '1.8', '1.9.3', '1.10.x' ]
63+
go: [ '1.13', '1.12' ]
3464
name: Go ${{ matrix.go }} sample
3565
steps:
36-
- uses: actions/checkout@master
66+
- uses: actions/checkout@v2
3767
- name: Setup go
3868
uses: actions/setup-go@v1
3969
with:
@@ -48,3 +78,7 @@ The scripts and documentation in this project are released under the [MIT Licens
4878
# Contributions
4979
5080
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)
81+
82+
## Code of Conduct
83+
84+
:wave: Be nice. See [our code of conduct](CONDUCT)

0 commit comments

Comments
 (0)