diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca1e001ee..3768d8c3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 }} \ No newline at end of file + 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 }} \ No newline at end of file diff --git a/test/cmd/main.go b/test/cmd/main.go new file mode 100644 index 000000000..3ac63e1df --- /dev/null +++ b/test/cmd/main.go @@ -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) +} diff --git a/test/go.mod b/test/go.mod new file mode 100644 index 000000000..9dfcb1d8a --- /dev/null +++ b/test/go.mod @@ -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 +) diff --git a/test/go.sum b/test/go.sum new file mode 100644 index 000000000..dc66ae8e2 --- /dev/null +++ b/test/go.sum @@ -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=