Skip to content

Commit ebcb6fe

Browse files
committed
fix: github actions pipeline
1 parent b0590d9 commit ebcb6fe

File tree

5 files changed

+733
-14
lines changed

5 files changed

+733
-14
lines changed

.github/workflows/master.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
run: ls -la .build
7474

7575
- name: Upload .build artifacts
76-
uses: actions/upload-artifact@v1
76+
uses: actions/upload-artifact@v2
7777
with:
7878
name: .build
7979
path: .build
@@ -99,7 +99,7 @@ jobs:
9999
run: docker version
100100

101101
- name: Download .build artifacts from Build Step
102-
uses: actions/download-artifact@v1
102+
uses: actions/download-artifact@v2
103103
with:
104104
name: .build
105105
path: .build

.github/workflows/release.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: ls -la .build
6161

6262
- name: Upload .build artifacts
63-
uses: actions/upload-artifact@v1
63+
uses: actions/upload-artifact@v2
6464
with:
6565
name: .build
6666
path: .build
@@ -89,7 +89,7 @@ jobs:
8989
run: docker version
9090

9191
- name: Download .build artifacts from Build Step
92-
uses: actions/download-artifact@v1
92+
uses: actions/download-artifact@v2
9393
with:
9494
name: .build
9595
path: .build
@@ -136,17 +136,16 @@ jobs:
136136
uses: actions/checkout@v2
137137

138138
- name: Create Release
139-
id: create_release
140-
uses: actions/create-release@v1
141-
env:
142-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139+
id: create_github_release
140+
uses: softprops/action-gh-release@v1
143141
with:
144-
tag_name: ${{ github.ref }}
145-
release_name: Release ${{ github.ref }}
146-
body: |
147-
See the file: CHANGELOG.md
142+
tag_name: ${{ github.ref_name }}
143+
name: ${{ github.ref_name }}
144+
# body: |
145+
# See the file: CHANGELOG.md
148146
draft: false
149147
prerelease: false
148+
token: ${{ secrets.GITHUB_TOKEN }}
150149

151150
publish_tarballs:
152151
name: Publish Tarballs
@@ -169,7 +168,7 @@ jobs:
169168
run: promu info
170169

171170
- name: Download .build artifacts from Build Step
172-
uses: actions/download-artifact@v1
171+
uses: actions/download-artifact@v2
173172
with:
174173
name: .build
175174
path: .build
@@ -195,7 +194,7 @@ jobs:
195194
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
196195

197196
- name: Upload Artifacts to Github
198-
uses: actions/upload-artifact@v1
197+
uses: actions/upload-artifact@v2
199198
with:
200199
name: releases
201200
path: .tarballs

.vscode/configurationCache.log

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"buildTargets":[".PHONY","/Users/christian/go/bin/promu","all","common-all","common-build","common-check_license","common-deps","common-docker","common-docker-amd64","common-docker-manifest","common-docker-publish","common-docker-publish-amd64","common-docker-tag-latest","common-docker-tag-latest-amd64","common-format","common-lint","common-staticcheck","common-style","common-tarball","common-test","common-test-short","common-unused","common-vet","promu","proto","style","update-go-deps"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}}

.vscode/dryrun.log

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
make --dry-run --always-make --keep-going --print-directory
2+
make: Entering directory `/Users/christian/git/github.com/slashdevops/aws_cloudwatch_exporter'
3+
echo ">> checking code style"
4+
fmtRes=$(gofmt -d $(find . -path ./vendor -prune -o -name '*.go' -print)); \
5+
if [ -n "${fmtRes}" ]; then \
6+
echo "gofmt checking failed!"; echo "${fmtRes}"; echo; \
7+
echo "Please ensure you are using $(go version) for formatting code."; \
8+
exit 1; \
9+
fi
10+
echo ">> checking license header"
11+
licRes=$(for file in $(find . -type f -iname '*.go' ! -path './vendor/*') ; do awk 'NR<=3' $file | grep -Eq "(Copyright|generated|GENERATED)" || echo $file; done); \
12+
if [ -n "${licRes}" ]; then \
13+
echo "license header checking failed:"; echo "${licRes}"; \
14+
exit 1; \
15+
fi
16+
echo ">> running check for unused/missing packages in go.mod"
17+
GO111MODULE=on go mod tidy
18+
git diff --exit-code -- go.sum go.mod
19+
20+
curl -s -L https://github.com/prometheus/promu/releases/download/v0.13.0/promu-0.13.0.darwin-arm64.tar.gz | tar -xvzf - -C /var/folders/yc/w7gzxwfd2wg4d8s043jvcrqr0000gn/T/tmp.YPDRPlLq
21+
mkdir -p /Users/christian/go/bin
22+
cp /var/folders/yc/w7gzxwfd2wg4d8s043jvcrqr0000gn/T/tmp.YPDRPlLq/promu-0.13.0.darwin-arm64/promu /Users/christian/go/bin/promu
23+
rm -r /var/folders/yc/w7gzxwfd2wg4d8s043jvcrqr0000gn/T/tmp.YPDRPlLq
24+
25+
echo ">> building binaries"
26+
GO111MODULE=on /Users/christian/go/bin/promu build --prefix /Users/christian/git/github.com/slashdevops/aws_cloudwatch_exporter
27+
echo ">> running all tests"
28+
GO111MODULE=on go test ./...
29+
make: Leaving directory `/Users/christian/git/github.com/slashdevops/aws_cloudwatch_exporter'
30+

0 commit comments

Comments
 (0)