Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Apr 13, 2022
1 parent 3921884 commit ab84bc9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish Docker image

on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Test
run: go test -v ./...

- name: Build
run: go build -v .
29 changes: 6 additions & 23 deletions .github/workflows/go.yml → .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
name: Go
on: [push, pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
name: Publish Docker image

- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Test
run: go test -v ./...

- name: Build
run: go build -v .
on:
push:
branches:
- main

jobs:
push_to_registry:
name: Docker
runs-on: ubuntu-latest
Expand All @@ -48,4 +32,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit ab84bc9

Please sign in to comment.