Skip to content

Commit

Permalink
Merge pull request #1 from falmar/dev
Browse files Browse the repository at this point in the history
pr workflow
  • Loading branch information
falmar committed Apr 29, 2023
2 parents 4595e1b + f3848f4 commit 47c1cab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: build

on:
push:
workflow_call:
pull_request:
branches:
- master
- dev

jobs:
build:
Expand Down Expand Up @@ -33,12 +36,3 @@ jobs:
CGO_ENABLED: "0"
GOOS: linux
GOARCH: ${{ matrix.platform }}

push:
if: ${{ success() }}
needs: build
uses: ./.github/workflows/push.yaml
with:
image_tag: "latest"
secrets:
HUB_PASSWORD: ${{ secrets.HUB_PASSWORD }}
18 changes: 8 additions & 10 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
name: push_image

on:
workflow_call:
inputs:
image_tag:
type: string
description: 'The tag of the image to push'
required: true
default: 'latest'
secrets:
HUB_PASSWORD:
required: true
push:
branches:
- master

env:
REGISTRY: docker.io
Expand All @@ -19,7 +12,12 @@ env:
DOCKER_IMAGE_TAG: ${{ inputs.image_tag }}

jobs:
build:
uses: ./.github/workflows/build.yaml

image:
if: ${{ success() }}
needs: build
env:
platform: linux/amd64,linux/arm64
runs-on: ubuntu-latest
Expand Down

0 comments on commit 47c1cab

Please sign in to comment.