Skip to content

Commit

Permalink
feat: adds deploy step to ci workflow (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman authored Oct 31, 2023
1 parent 49b4abc commit e2eea0c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ on:
required: false
type: string
default: latest
deployment_images:
description: A newline separated list of image names to deploy
required: false
type: string
deployment_repo:
description: The URL of the repository containing deployment code
required: false
type: string
default: input-output-hk/catalyst-world
earthly_version:
description: The version of Earthly to use.
required: false
Expand All @@ -43,6 +52,9 @@ on:
required: false
type: string
secrets:
deployment_token:
description: A Github token with access to the deployment repository.
required: false
dockerhub_username:
description: The token to use for logging into the DockerHub registry.
required: false
Expand Down Expand Up @@ -146,4 +158,13 @@ jobs:
dockerhub_token: ${{ secrets.dockerhub_token }}
dockerhub_username: ${{ secrets.dockerhub_username }}
earthly_runner_address: ${{ secrets.earthly_runner_address }}
earthly_runner_secret: ${{ secrets.earthly_runner_secret }}
earthly_runner_secret: ${{ secrets.earthly_runner_secret }}
deploy:
uses: input-output-hk/catalyst-ci/.github/workflows/deploy.yml@master
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && inputs.deployment_images != ''
needs: [publish]
with:
deployment_repo: ${{ inputs.deployment_repo }}
images: ${{ inputs.deployment_images }}
secrets:
token: ${{ secrets.deployment_token }}
19 changes: 19 additions & 0 deletions test/cmd/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package main

import (
"fmt"

cowsay "github.com/Code-Hex/Neo-cowsay/v2"
)

func main() {
say, err := cowsay.Say(
"Hello, IOG!",
cowsay.Type("default"),
cowsay.BallonWidth(40),
)
if err != nil {
panic(err)
}
fmt.Println(say)
}
11 changes: 11 additions & 0 deletions test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module github.com/input-output-hk/catalyst-ci/test

go 1.20

require github.com/Code-Hex/Neo-cowsay/v2 v2.0.4

require (
github.com/Code-Hex/go-wordwrap v1.0.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
)
14 changes: 14 additions & 0 deletions test/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
github.com/Code-Hex/Neo-cowsay/v2 v2.0.4 h1:y80Hd9hmB+rsEH/p4c5ti5PbO0PhBmxw4NgbpFZvoHg=
github.com/Code-Hex/Neo-cowsay/v2 v2.0.4/go.mod h1:6k40Pwrc2FazLf1BUbmAC36E9LvT+DErjZr30isbXhg=
github.com/Code-Hex/go-wordwrap v1.0.0 h1:yl5fLyZEz3+hPGbpTRlTQ8mQJ1HXWcTq1FCNR1ch6zM=
github.com/Code-Hex/go-wordwrap v1.0.0/go.mod h1:/SsbgkY2Q0aPQRyvXcyQwWYTQOIwSORKe6MPjRVGIWU=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

0 comments on commit e2eea0c

Please sign in to comment.