Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/at-wat/assets-sync-action

GitHub Action to deploy asset files to multiple repositories.
https://github.com/at-wat/assets-sync-action

deployment github-action

Last synced: 3 months ago
JSON representation

GitHub Action to deploy asset files to multiple repositories.

Awesome Lists containing this project

README

        

# assets-sync-action

GitHub Action to deploy asset files to multiple repositories.

## Inputs


repos
Space separated list of target repository slugs. (required)

github_token
GitHub personal access token with write permission to the repos. Use encrypted secrets. (required)

git_user
User name of commit author. (required)

git_email
E-mail address of commit author. (required)

commit_message
Commit message of generated commits. Defaults to Update assets to %v. (%v: version tag string)

branch
Branch name to which the changes are committed. Defaults to sync-assets-%v. (%v: version tag string)

root_dir
Root directory of the assets for this job. Defaults to root.

rm
Files to be removed.

dryrun
Set true to run the job without pushing.

exclude_paths
Space separated list of excluded path globs.

## Directory structure

The repository using assets-sync-action must have `./root` directory.
Files in the `./root` will be deployed to the target repositories keeping its directory structure.

```
.
├── .github
│   └── workflows
│   └── assets-sync.yml (see example section)
└── root
├── dir
│   └── another-file-to-be-deployed
└── file-to-be-deployed
```

## Example

Deploy the files by adding `v0.0.0` style tag.

```yaml
name: assets-sync
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: sync
uses: at-wat/assets-sync-action@v0
with:
repos: @@owner/repo1@@ @@owner/repo2@@
git_user: @@MAINTAINER_NAME@@
git_email: @@MAINTAINER_EMAIL_ADDRESS@@
github_token: ${{ secrets.GITHUB_TOKEN_REPO }}
```

See https://github.com/at-wat/.rospkg-assets for the working example.