https://github.com/kskitek/screeps-pusher
GH Action that pushes JS code to screeps.com
https://github.com/kskitek/screeps-pusher
actions gha go screeps
Last synced: about 1 month ago
JSON representation
GH Action that pushes JS code to screeps.com
- Host: GitHub
- URL: https://github.com/kskitek/screeps-pusher
- Owner: kskitek
- License: mit
- Created: 2022-07-09T21:24:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-09T23:44:27.000Z (almost 4 years ago)
- Last Synced: 2026-03-11T13:48:24.699Z (4 months ago)
- Topics: actions, gha, go, screeps
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# screeps-pusher
It is a small utility program and GitHub Action to push JavaScript code into Screeps.com.
## Inputs
| Input | Description |
|---------|-------------|
| branch | Required. Destination branch in screeps. Be aware that screeps does not create new branch automatically. |
| token | Required. Screeps API token. Can be obtained from account settings: https://screeps.com/a/#!/account/auth-tokens. |
| dir | Optional. Directory for .js files. |
| apiURL | Optional. Screeps server API URL. |
| timeout | Optional. HTTP Client timeout. |
## Example
```yaml
steps:
- name: Checkout
uses: actions/checkout@master
- name: Push the code
id: myaction
uses: kskitek/screeps-pusher@v0.1
with:
branch: experimental
token: ${{ secrets.token }}
```
## Full example
```yaml
steps:
- name: Checkout
uses: actions/checkout@master
- name: Push the code
id: myaction
uses: kskitek/screeps-pusher@v0.1
with:
branch: experimental
token: ${{ secrets.token }}
dir: src/
apiURL: https://screeps.com/api/user/code
timeout: 10s
```
## Full workflow example to push on tag/release
`.github/workflows/tag.yml`
```yaml
name: Push released code
on: tags
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Push the code
id: myaction
uses: kskitek/screeps-pusher@v0.1
with:
branch: main
token: ${{ secrets.token }}
```
## Full workflow example to push on PR
`.github/workflows/pr.yml`
```yaml
name: Push experimental code
on: pull_request
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Push the code
id: myaction
uses: kskitek/screeps-pusher@v0.1
with:
branch: ${{ github.ref_name }} # be aware that screeps does not create new branch automatically
token: ${{ secrets.token }}