-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Roman Ackermann
committed
Nov 18, 2019
0 parents
commit 7e6273e
Showing
5 changed files
with
66 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,19 @@ | ||
name: Test CF CLI Action | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: citizen-of-planet-earth/cf-cli-action@master | ||
with: | ||
cf_api: ${{ secrets.CF_API }} | ||
cf_username: ${{ secrets.CF_USER }} | ||
cf_password: ${{ secrets.CF_PASSWORD }} | ||
cf_org: ${{ secrets.CF_ORG }} | ||
cf_space: ${{ secrets.CF_SPACE }} | ||
command: target |
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,8 @@ | ||
FROM ubuntu:18.04 | ||
|
||
RUN echo "deb [trusted=yes] https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list | ||
RUN sudo apt-get update | ||
RUN sudo apt-get install cf-cli | ||
|
||
ADD entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] |
Empty file.
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,29 @@ | ||
name: "CF CLI" | ||
description: "Deploy and manage Cloud Foundry using the cf cli" | ||
branding: | ||
icon: "upload-cloud" | ||
color: "blue" | ||
inputs: | ||
cf_api: | ||
description: "Target API Endpoint of Cloud Foundry" | ||
required: true | ||
cf_username: | ||
description: "Username for API authentication" | ||
required: true | ||
cf_password: | ||
description: "Password for API authentication" | ||
required: true | ||
cf_org: | ||
description: "Target Organization" | ||
required: false | ||
cf_space: | ||
description: "Target Space" | ||
required: false | ||
command: | ||
description: "Command to run using CF CLI" | ||
required: true | ||
runs: | ||
using: "docker" | ||
image: "Dockerfile" | ||
args: | ||
- ${{ inputs.command }} |
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,10 @@ | ||
#!/bin/sh -l | ||
|
||
cf api "$CF_API" | ||
cf auth "$CF_USERNAME" "$CF_PASSWORD" | ||
|
||
if [ -n "$CF_ORG" ] && [ -n "$CF_SPACE" ]; then | ||
cf target -o "$CF_ORG" -s "$CF_SPACE" | ||
fi | ||
|
||
sh -c "cf $*" |