Skip to content

Commit ec47179

Browse files
authored
Merge pull request #27 from getporter/cleanWorkflows
Update dependencies and cleanup workflows
2 parents dd72110 + 6a30ec1 commit ec47179

File tree

11 files changed

+52
-87
lines changed

11 files changed

+52
-87
lines changed

.github/workflows/assign-to-project.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,13 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 0
14-
- name: Set up Cache
15-
uses: actions/cache@v2
16-
with:
17-
path: ~/go/pkg/mod
18-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
19-
restore-keys: |
20-
${{ runner.os }}-go-
2114
- name: Set up Go
22-
uses: actions/setup-go@v3
15+
uses: actions/setup-go@v5
2316
with:
24-
go-version: 1.18
25-
check-latest: true
17+
go-version-file: go.mod
2618
- name: Set up Mage
2719
run: go run mage.go ConfigureAgent
2820
- name: Build

.github/workflows/publish.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,21 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
17-
- name: Set up Cache
18-
uses: actions/cache@v2
19-
with:
20-
path: ~/go/pkg/mod
21-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
22-
restore-keys: |
23-
${{ runner.os }}-go-
2417
- name: Set up Go
25-
uses: actions/setup-go@v3
18+
uses: actions/setup-go@v5
2619
with:
27-
go-version: 1.18
28-
check-latest: true
20+
go-version-file: go.mod
2921
- name: Set up Mage
3022
run: go run mage.go ConfigureAgent
31-
- name: Test
23+
- name: Build
3224
run: mage -v Build
25+
- name: Test
26+
run: mage -v Test
3327
- name: Docker Login
34-
uses: docker/login-action@v1
28+
uses: docker/login-action@v3
3529
with:
3630
registry: ghcr.io
3731
username: ${{ github.actor }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.cnab/
22
bin/
3-
3+
.vscode/

exec-outputs/Dockerfile.tmpl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@ ARG BUNDLE_DIR
44

55
# Install jq, we aren't using the mixin because it's an example bundle and jq
66
# isn't a default mixin
7-
RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
8-
RUN apt-get update && apt-get install gnupg2 -y
9-
ENV JQ_VERSION='1.6'
10-
RUN wget --no-check-certificate https://raw.githubusercontent.com/stedolan/jq/master/sig/jq-release.key -O /tmp/jq-release.key && \
11-
wget --no-check-certificate https://raw.githubusercontent.com/stedolan/jq/master/sig/v${JQ_VERSION}/jq-linux64.asc -O /tmp/jq-linux64.asc && \
12-
wget --no-check-certificate https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 -O /tmp/jq-linux64 && \
13-
gpg --import /tmp/jq-release.key && \
14-
gpg --verify /tmp/jq-linux64.asc /tmp/jq-linux64 && \
15-
cp /tmp/jq-linux64 /usr/bin/jq && \
16-
chmod +x /usr/bin/jq && \
17-
rm -f /tmp/jq-release.key && \
18-
rm -f /tmp/jq-linux64.asc && \
19-
rm -f /tmp/jq-linux64
7+
RUN apt-get update && apt-get install gnupg2 jq -y && rm -rf /var/lib/apt/lists/*
208

219
# Use the BUNDLE_DIR build argument to copy files into the bundle
2210
COPY . ${BUNDLE_DIR}

go.mod

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
module get.porter.sh/example-bundles
22

3-
go 1.18
3+
go 1.21
4+
5+
toolchain go1.21.3
46

57
require (
6-
get.porter.sh/magefiles v0.3.2
8+
get.porter.sh/magefiles v0.6.8
79
github.com/carolynvs/magex v0.9.0
810
github.com/hashicorp/go-multierror v1.1.1
9-
github.com/magefile/mage v1.14.0
11+
github.com/magefile/mage v1.15.0
1012
github.com/stretchr/testify v1.8.0
1113
golang.org/x/sync v0.0.0-20220907140024-f12130a52804
1214
gopkg.in/yaml.v3 v3.0.1
1315
)
1416

1517
require (
16-
github.com/Masterminds/semver/v3 v3.1.1 // indirect
17-
github.com/andybalholm/brotli v1.0.4 // indirect
18+
github.com/Masterminds/semver/v3 v3.2.1 // indirect
19+
github.com/andybalholm/brotli v1.1.0 // indirect
1820
github.com/davecgh/go-spew v1.1.1 // indirect
1921
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
2022
github.com/golang/snappy v0.0.4 // indirect
2123
github.com/hashicorp/errwrap v1.1.0 // indirect
22-
github.com/klauspost/compress v1.15.10 // indirect
23-
github.com/klauspost/pgzip v1.2.5 // indirect
24+
github.com/klauspost/compress v1.17.7 // indirect
25+
github.com/klauspost/pgzip v1.2.6 // indirect
2426
github.com/kr/pretty v0.3.0 // indirect
2527
github.com/mholt/archiver/v3 v3.5.1 // indirect
2628
github.com/nwaples/rardecode v1.1.3 // indirect
27-
github.com/pierrec/lz4/v4 v4.1.16 // indirect
29+
github.com/pierrec/lz4/v4 v4.1.21 // indirect
2830
github.com/pmezard/go-difflib v1.0.0 // indirect
2931
github.com/rogpeppe/go-internal v1.8.1 // indirect
30-
github.com/ulikunitz/xz v0.5.10 // indirect
32+
github.com/ulikunitz/xz v0.5.11 // indirect
3133
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
3234
)

go.sum

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
get.porter.sh/magefiles v0.3.2 h1:RDJini5LBQ8pYnc0r8M6cX2Pk+CPsCtyFwO3fy8Jb5g=
22
get.porter.sh/magefiles v0.3.2/go.mod h1:w8ikniAFHO7AVvWayyWF7ViHoh4tNKwTxtKpO1FyGkU=
3+
get.porter.sh/magefiles v0.6.8 h1:1q0CmKgOtlP8IBXtRNLv2+r9tLiC96tpIPhTHX+HlUw=
4+
get.porter.sh/magefiles v0.6.8/go.mod h1:w37oTKICvvaEKR5KVB9UfN2EX30uYO9Qk0oRoz80DOU=
35
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
46
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
7+
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
8+
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
59
github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
610
github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
711
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
12+
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
13+
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
814
github.com/carolynvs/magex v0.9.0 h1:fWe7oshGv6zuei5Z6EI95RSlOKjIifBZ26myB9G+m/I=
915
github.com/carolynvs/magex v0.9.0/go.mod h1:H1LW6RYJ/sNbisMmPe9E73aJZa8geKLKK9mBWLWz3ek=
1016
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -27,9 +33,13 @@ github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0
2733
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
2834
github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo=
2935
github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
36+
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
37+
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
3038
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
3139
github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
3240
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
41+
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
42+
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
3343
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
3444
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
3545
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
@@ -40,6 +50,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
4050
github.com/magefile/mage v1.13.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
4151
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
4252
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
53+
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
54+
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
4355
github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo=
4456
github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4=
4557
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
@@ -48,6 +60,8 @@ github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWk
4860
github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
4961
github.com/pierrec/lz4/v4 v4.1.16 h1:kQPfno+wyx6C5572ABwV+Uo3pDFzQ7yhyGchSyRda0c=
5062
github.com/pierrec/lz4/v4 v4.1.16/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
63+
github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ=
64+
github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
5165
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
5266
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
5367
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -63,6 +77,8 @@ github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oW
6377
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
6478
github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8=
6579
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
80+
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
81+
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
6682
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
6783
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
6884
golang.org/x/sync v0.0.0-20220907140024-f12130a52804 h1:0SH2R3f1b1VmIMG7BXbEZCBUu2dKmHschSmjqGUrW8A=

mage/examples/examples.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package examples
22

33
import (
44
"fmt"
5-
"io/ioutil"
65
"os"
76
"path/filepath"
87

@@ -12,7 +11,7 @@ import (
1211
// GetBundleRef builds the reference to the specified example bundle, given a registry override.
1312
func GetBundleRef(bundleDir string, registryOverride string) (string, error) {
1413
manifestPath := filepath.Join(bundleDir, "porter.yaml")
15-
contents, err := ioutil.ReadFile(manifestPath)
14+
contents, err := os.ReadFile(manifestPath)
1615
if err != nil {
1716
return "", fmt.Errorf("error reading porter manifest at %s: %w", manifestPath, err)
1817
}
@@ -46,7 +45,7 @@ func GetBundleRef(bundleDir string, registryOverride string) (string, error) {
4645

4746
// List returns the names of all example bundles in the specified directory.
4847
func List(dir string) ([]string, error) {
49-
results, err := ioutil.ReadDir(dir)
48+
results, err := os.ReadDir(dir)
5049
if err != nil {
5150
return nil, fmt.Errorf("error listing example bundles in current directory: %w", err)
5251
}

mage/examples/examples_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package examples
22

33
import (
4-
"io/ioutil"
54
"os"
65
"testing"
76

@@ -12,7 +11,7 @@ import (
1211
)
1312

1413
func TestListExampleBundles(t *testing.T) {
15-
tmp, err := ioutil.TempDir("", "example-bundles")
14+
tmp, err := os.MkdirTemp("", "example-bundles")
1615
require.NoError(t, err)
1716
defer os.RemoveAll(tmp)
1817

mage/setup/mixins.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ func InstallMixins() error {
1717
{Name: "docker"},
1818
{Name: "docker-compose"},
1919
{Name: "exec"},
20-
// Use a build of helm3 that supports nonroot
21-
// https://github.com/MChorfa/porter-helm3/pull/42
22-
{Name: "helm3", Feed: "https://mchorfa.github.io/porter-helm3/atom.xml", Version: "v1.0.0-rc.1"},
20+
{Name: "helm3", Feed: "https://mchorfa.github.io/porter-helm3/atom.xml", Version: "v1.0.1"},
2321
{Name: "kubernetes"},
2422
{Name: "terraform"},
2523
}
@@ -34,5 +32,5 @@ func InstallMixins() error {
3432
}
3533

3634
func EnsurePorter() {
37-
porter.EnsurePorterAt("v1.0.0-rc.1")
35+
porter.EnsurePorter()
3836
}

0 commit comments

Comments
 (0)