Skip to content
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: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: googleapis/release-please-action@v4
with:
release-type: node
package-name: "@stordco/actions-sync"
package-name: "@beam-community/actions-sync"
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
extra-files: README.md

Expand Down Expand Up @@ -55,8 +55,8 @@ jobs:
- if: steps.release.outputs.release_created
name: Tag
run: |
git config user.name stord-engineering-account
git config user.email engineering@stord.com
git config user.name thebeambot
git config user.email seancallan+beambot@gmail.com

git add -f dist
git commit --amend --no-edit
Expand Down
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,49 @@ Normal variables are basic strings. In some cases you want to use JSON objects o
{{/each}}
```

### Ignoring Files

You can exclude specific template files from being synced using the `ignore-files` input. Paths are relative to the `templates/` directory.

```yaml
- uses: beam-community/actions-sync@v1
with:
sync-repository: beam-community/common-config
ignore-files: |
.github/workflows/release.yml
.tool-versions
```

## Configuration File

You can configure actions-sync via a `.github/actions-sync.yml` file in your target repository. This allows each repository to customize sync behavior without modifying the workflow.

```yaml
# .github/actions-sync.yml
commit-branch: chore/sync-config
commit-message: "chore: update synced files"
pr-enabled: false
pr-title: "chore: sync configuration files"
ignore-files:
- .github/workflows/ci.yaml
- .credo.exs
```

All fields are optional and serve as fallbacks when the corresponding action inputs are not specified. Available options:

| Field | Description |
|-------|-------------|
| `commit-branch` | Branch name for sync commits |
| `commit-message` | Commit message for changes |
| `commit-user-email` | Git user email for commits |
| `commit-user-name` | Git user name for commits |
| `ignore-files` | List of template files to skip |
| `pr-body` | Pull request body text |
| `pr-enabled` | Whether to create a PR (`true`/`false`) |
| `pr-labels` | Labels to apply to the PR |
| `pr-review-users` | Users to request review from |
| `pr-title` | Pull request title |

## Alternatives

There are many other git sync type actions currently on GitHub, however most of them only handle static files. This action was created where some files are dynamic and should be templated or scripted before synced.
15 changes: 14 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ branding:

inputs:
commit-branch:
description: The branch to commit changes to
description: The branch to commit changes to. Falls back to config file value if not specified.
required: false
type: string
default: gha/actions-sync
config-file:
description: |
Path to the configuration file relative to the repository root.
Defaults to .github/actions-sync.yml
required: false
type: string
default: .github/actions-sync.yml
commit-message:
description: The commit message to use when committing changes
required: false
Expand Down Expand Up @@ -75,6 +82,12 @@ inputs:
required: false
type: string
default: main
ignore-files:
description: |
Newline-separated list of file paths to ignore during sync.
Paths are relative to the templates directory. Falls back to config file value if not specified.
required: false
type: string

outputs:
pull_request_url:
Expand Down
Loading
Loading