-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create action.yml * Create README.md * Update README.md
- Loading branch information
1 parent
b434478
commit 7d056cb
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Setup OSS Environment | ||
|
||
This action installs ossutil and configures the OSS environment for further operations. | ||
|
||
## Inputs | ||
|
||
### `oss-id` | ||
|
||
**Required** OSS access key ID. | ||
|
||
### `oss-secret` | ||
|
||
**Required** OSS access key secret. | ||
|
||
### `oss-endpoint` | ||
|
||
**Required** OSS endpoint. | ||
|
||
## Example usage | ||
|
||
```yaml | ||
uses: vesoft-inc/.github/actions/setup-oss@master | ||
with: | ||
oss-id: ${{ secrets.OSS_ID }} | ||
oss-secret: ${{ secrets.OSS_SECRET }} | ||
oss-endpoint: ${{ secrets.OSS_ENDPOINT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Setup OSS Environment' | ||
description: 'Install ossutil and configure OSS credentials' | ||
inputs: | ||
oss-id: | ||
description: 'OSS access key ID' | ||
required: true | ||
oss-secret: | ||
description: 'OSS access key secret' | ||
required: true | ||
oss-endpoint: | ||
description: 'OSS endpoint' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install ossutil | ||
run: | | ||
if ! command -v ossutil &> /dev/null || ! command -v ossutil64 &> /dev/null | ||
then | ||
(command -v sudo &> /dev/null && curl https://gosspublic.alicdn.com/ossutil/install.sh | sudo bash) || curl https://gosspublic.alicdn.com/ossutil/install.sh | bash | ||
fi | ||
shell: bash | ||
|
||
- name: Configure OSS | ||
run: | | ||
ossutil64 config -e ${{ inputs.oss-endpoint }} -i ${{ inputs.oss-id }} -k ${{ inputs.oss-secret }} -L CH | ||
shell: bash |