Skip to content

There is no more force update.. #552

There is no more force update..

There is no more force update.. #552

Workflow file for this run

name: Update the deployment repository
on:
push:
branches:
- main
jobs:
update-deployment-repository:
runs-on: ubuntu-latest
steps:
- name: Update the repository in the deployment repository
run: |
# Define the repository we are pushing to
repo_owner="EVE-KILL"
repo_name="Deployment"
# Define the event type
event_type="update-killboard"
# Define the branch we are pushing to
branch="main"
# Define the commit hash we just pushed
commit_hash=${{ github.sha }}
# Echo out the variables
echo "Commit Hash: $commit_hash"
echo "Platform Environment: $branch"
echo "Push to repository: $repo_owner/$repo_name"
echo "Event Type: $event_type"
# Create the json payload we will send to the repository dispatch event
payload='{
"event_type": "'$event_type'",
"client_payload":
{
"submodule": "killboard",
"environment": "'$branch'",
"commit": "'$commit_hash'"
}
}'
payload=$(echo $payload | jq -c .)
# Trigger the repository dispatch event
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.REPO_ACCESS_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
-d "$payload"