https://github.com/link-u/execute-on-separated-ubuntu
GitHub Action / Executes a shell script inside a separated docker container
https://github.com/link-u/execute-on-separated-ubuntu
github-actions github-actions-ci github-actions-docker
Last synced: 7 months ago
JSON representation
GitHub Action / Executes a shell script inside a separated docker container
- Host: GitHub
- URL: https://github.com/link-u/execute-on-separated-ubuntu
- Owner: link-u
- License: mit
- Created: 2020-06-06T10:43:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T05:35:40.000Z (over 2 years ago)
- Last Synced: 2025-05-10T09:47:38.381Z (7 months ago)
- Topics: github-actions, github-actions-ci, github-actions-docker
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action - Execute a script on separeted ubuntu environment.
This Github action executes a shell script inside a separated docker container, which are more cleaner than default runner environment.
## Usage
### Inputs
- `script`: Script path to execute. Relative to `$GITHUB_WORKSPACE`.
- `on`: Codename of ubuntu to execute build script. `focal`(20.04) or `bionic`(18.04).
### Outputs
No outputs.
### Example workflow - build a project!
```yaml
on: push
name: Build binaries
jobs:
build:
runs-on: ubuntu-latest
matrix:
codename: [bionic, focal]
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0
- name: Build the binary
uses: link-u/execute-on-separated-ubuntu@v1
with:
on: ${{ matrix.codename }}
script: scripts/build.sh
```
This will execute `(your-repository)/scripts/build.sh` in both ubuntu-20.04 and 18.04.
Created artifacts are stored in `$GITHUB_WORKSPACE`, so you can upload [as an artifact](https://github.com/actions/upload-artifact), [as an release asset](https://github.com/actions/upload-release-asset) and so on.