Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test pull requests
description: "Test the playbook using the galaxy-k8s action"

on:
workflow_dispatch: {}
pull_request:
types: [opened, synchronize, reopened]

jobs:
run:
name: Install Kubernetes and Galaxy
runs-on: ubuntu-latest
steps:
- name: Install Kubernetes and Galaxy
uses: ksuderman/galaxy-k8s-action@v1
with:
api-key: secret
playbook-repo: ${{ github.event.pull_request.head.repo.full_name }}
playbook-ref: ${{ github.event.pull_request.head.ref }}

- name: Create a Galaxy user
run: |
cat > /tmp/user.json << EOF
{
"email": "[email protected]",
"password": "galaxypassword",
"username": "admin"
}
EOF
response=$(curl -s -H "x-api-key: secret" -H "Content-Type: application/json" -d @/tmp/user.json http://localhost/api/users)
echo $response | jq
error=$(echo $response | jq -r .err_msg)
if [[ $error != null ]]; then
echo "Error creating user: $error"
exit 1
fi