Skip to content

skip actions now - need to prepare proper merge job befor #28

skip actions now - need to prepare proper merge job befor

skip actions now - need to prepare proper merge job befor #28

Workflow file for this run

name: run tests
on:
pull_request:
types:
- labeled
permissions:
contents: write
pull-requests: write
jobs:
acc_tests:
name: acceptance tests
runs-on: ubuntu-22.04
environment: tests
if: ${{ contains(fromJSON('["post", "gate"]'), github.event.label.name) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.20"
- run: make acceptance
env:
OS_AUTH_URL: ${{ secrets.AUTH_URL }}
OS_DOMAIN_NAME: ${{ secrets.USER_DOMAIN_NAME }}
OS_PASSWORD: ${{ secrets.PASSWORD }}
OS_USERNAME: ${{ secrets.USERNAME }}
OS_PROJECT_NAME: ${{ vars.FUNCTEST_PROJECT_NAME }}
OS_REGION: "eu-de"
merge:
runs-on: ubuntu-latest
name: merge branch into devel
environment: github
needs:
- acc_tests
if: ${{ github.event.label.name == 'gate' && success() }}
steps:
- uses: actions/checkout@v4
- uses: kattecon/gh-app-access-token-gen@v1
id: gen_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_KEY }}
installation_id: ${{ secrets.INSTALLATION_ID }}
- run: |
echo "Get current branch"
BRANCH_NAME=$(curl -s -H "Authorization: token ${{ steps.gen_token.outputs.token }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
| jq -r '.head_branch')
echo "branch_name=$BRANCH_NAME"
echo "Perform merge to devel"
URL=https://api.github.com/repos/opentelekomcloud/${{ github.repository }}/merges"
echo "url=$URL"
curl -X POST \
-H "Authorization: ${{ steps.gen_token.outputs.token }}" \
-H "Accept: application/vnd.github.v3+json" \
$URL \
-d "{\"base\":\"devel\",\"head\":\"${BRANCH_NAME}\"}"