Skip to content

Merge pull request #20 from soujava/dependabot/maven/org.primefaces-p… #37

Merge pull request #20 from soujava/dependabot/maven/org.primefaces-p…

Merge pull request #20 from soujava/dependabot/maven/org.primefaces-p… #37

Workflow file for this run

# This workflow will build and push to Platform.sh
#
# To use this workflow, you will need to complete the following set-up steps:
#
# 1. Create a Platform.sh project.
# Reference: https://docs.platform.sh/gettingstarted/own-code/create-project.html
# https://docs.platform.sh/gettingstarted/template/create-project.html
# https://console.platform.sh/
#
# 2. Create a Platform.sh API Tokens
# https://docs.platform.sh/development/cli/api-tokens.html
#
# 3. Generate a Githu token
# https://docs.platform.sh/administration/integrations/github.html
# https://github.com/settings/tokens/new
#
# 4. Store a Platform.sh project ID in GitHub Actions secrets named `PLATFORM_PROJECT_ID`
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
#
# 5. Store a Platform.sh API tokens in GitHub Actions secrets named `PLATFORM_AUTHENTICATION`
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
#
# 6. Store a Github API token in GitHub Actions secrets named `TOKEN_GITHUB`
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
#
name: Deploy on Platform.sh
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Deploy with Platform.sh
env:
HEADER: 'Content-Type: application/json'
PLATFORM_AUTHENTICATION: ${{ secrets.PLATFORM_AUTHENTICATION }}
PLATFORM_PROJECT_ID: ${{ secrets.PLATFORM_PROJECT_ID }}
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
run: |
export AUTHENCICATION="Authorization: Bearer ${PLATFORM_AUTHENTICATION}"
export HOST=https://api.platform.sh/projects/$PLATFORM_PROJECT_ID/integrations
export BODY="'{\"type\": \"GithubIntegrationCreateInput\", \"token\": \"${GITHUB_TOKEN}\", \"repository\": \"${GITHUB_REPOSITORY}\"}'"
echo $BODY
echo $HEADER
echo $AUTHENCICATION
echo $HOST
curl -d $BODY -H $HEADER -H $AUTHENCICATION -X POST $HOST