Skip to content
Open
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
22 changes: 19 additions & 3 deletions .github/workflows/build_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Build and Commit Binaries

on:
push:
branches: [master]
branches: [ master ]
paths-ignore: # Prevents the workflow from running on binaries changes.
- 'bin/**'

concurrency:
group: building
Expand All @@ -11,14 +13,28 @@ concurrency:
jobs:

build:
# Prevents the workflow from running on non-human triggers.
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
timeout-minutes: 10

steps:

# Initializes an SSH agent and loads the Deploy Key.
# All subsequent git operations (fetch/push) are authenticated via SSH.
#
# This step uses Deploy Key to bypass the master branch protection rule,
# which allows to push changes to the master branch only via pull request.
#
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.WORKFLOW_DEPLOY_KEY }}

# Checkout the repository via SSH Deploy Key.
- name: Checkout Repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.WORKFLOW_DEPLOY_KEY }}
persist-credentials: false

- name: Set Up Go Environment
uses: actions/setup-go@v5
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,17 @@ GOOS=windows GOARCH=amd64 go build -trimpath -o bin/embed-code-windows.exe main.
GOOS=linux GOARCH=amd64 go build -trimpath -o bin/embed-code-linux main.go
```

## Development Notes

This repository is configured with the following GitHub workflows:
- `check` — runs tests across different platforms.
- `build_binaries` — builds binaries on push to the `master` branch.
> Note: This workflow uses a **Deploy Key** instead of the default GitHub Actions bot
> to bypass the `master` branch protection against direct pushes.
>
> If it is necessary to update the Deploy Key, follow these steps:
> 1. Generate an SSH key pair for GitHub: `ssh -i ~/.ssh/workflow_deploy_key -T [email protected]`.
> 2. Add the public key (`workflow_deploy_key.pub`) as a **Deploy Key** in GitHub with write access.
> 3. Add the private key (`workflow_deploy_key`) as a repository secret named `WORKFLOW_DEPLOY_KEY`.

[embed-code-jekyll]: https://github.com/SpineEventEngine/embed-code
Loading