Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add deployment workflow for main branch #1

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ jobs:
needs: build
uses: ./.github/workflows/image.yml
secrets: inherit

deploy:
if: ${{ github.ref_name == 'main' }}
needs: image
uses: ./.github/workflows/deploy.yml
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy

on:
workflow_call:

jobs:
update-deployment:
name: Update Deployment
runs-on: self-hosted

steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GH_PAT }}
repository: pesca-dev/kneipolympics-deploy
event-type: kneipolympics-deploy-trigger
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
Loading