Skip to content

Commit 820d4ea

Browse files
committed
simplify github action definitions
1 parent 6ae4121 commit 820d4ea

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

.github/workflows/docker-cloud-test.yml

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

.github/workflows/docker-cloud-publish.yml renamed to .github/workflows/docker-cloud.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
1-
name: docker-cloud go publish
2-
on: push
1+
name: docker-cloud go tests
2+
on: [push]
3+
defaults:
4+
run:
5+
working-directory: docker-cloud
36
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Set up Go
12+
uses: actions/setup-go@v3
13+
with:
14+
go-version-file: "docker-cloud/go.mod"
15+
cache-dependency-path: "docker-cloud/go.sum"
16+
cache: true
17+
- name: Build
18+
run: go build -v ./...
19+
- name: Test
20+
run: go test -v ./...
421
publish:
22+
needs: test
523
permissions:
624
id-token: write
725
runs-on: ubuntu-latest
8-
defaults:
9-
run:
10-
working-directory: docker-cloud
1126
steps:
1227
- uses: actions/checkout@v3
1328
- name: Configure AWS Credentials

0 commit comments

Comments
 (0)