Skip to content

Commit

Permalink
chore: integrates new merge action into deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Oct 17, 2023
1 parent bc99c00 commit 770eff0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
40 changes: 32 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
on:
workflow_call:
inputs:
deployment_repo:
description: The URL of the repository containing deployment code
required: false
type: string
default: "https://github.com/input-output-hk/catalyst-world"
environment:
description: The target environment to deploy to
required: false
type: string
default: dev
hash_file:
description: The relative path to the hash file to update with deployment information
required: true
type: string
images:
description: A space separated list of images to deploy.
description: A newline separated list of image names to deploy
required: true
type: string
tag:
description: The tag to use for deploying images.
required: true
description: The image tag to deploy
required: false
type: string
default: ${{ github.sha }}
secrets:
token:
description: A Github token with access to the deployment repository.
Expand All @@ -18,11 +33,20 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: input-output-hk/catalyst-ci/actions/deploy@master
- name: Checkout deployment repository
uses: actions/checkout@v4
with:
repository: ${{ inputs.deployment_repo }}
token: ${{ secrets.token }}
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "catalyst-cibot"
- name: Merge hashes
uses: input-output-hk/catalyst-ci/actions/merge@deploy-action
with:
deployment_repo: input-output-hk/catalyst-world
hash_file: "src/kube/environments/${{ inputs.environment }}/hashes.json"
images: ${{ inputs.images }}
environment: dev
tag: ${{ inputs.tag }}
token: ${{ secrets.token }}
- name: Run diff
run: git --no-pager diff
8 changes: 6 additions & 2 deletions actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ description: Deploys the published images to the remote cluster.
inputs:
deployment_repo:
description: The URL of the repository containing deployment code
required: true
required: false
default: "https://github.com/input-output-hk/catalyst-world"
environment:
description: The target environment to deploy to
required: true
hash_file:
description: The relative path to the hash file to update with deployment information
required: true
images:
description: A space separated list of image names to deploy
required: true
Expand All @@ -23,7 +27,7 @@ runs:
using: composite
steps:
- name: Checkout deployment repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ inputs.deployment_repo }}
token: ${{ inputs.token }}
Expand Down

0 comments on commit 770eff0

Please sign in to comment.