Skip to content

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

skip actions now - need to prepare proper merge job befor

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

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 }}
- name: Merge PR
run: |

Check failure on line 48 in .github/workflows/labels.yaml

View workflow run for this annotation

GitHub Actions / run tests

Invalid workflow file

The workflow is not valid. .github/workflows/labels.yaml (Line: 48, Col: 14): Unrecognized named-value: 'BRANCH_NAME'. Located at position 1 within expression: BRANCH_NAME
# Extract the branch name from GITHUB_REF
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"
# Perform the merge
curl -X POST \
-H "Authorization: ${{ steps.gen_token.outputs.token }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/owner/repo/merges \
-d "{\"base\":\"devel\",\"head\":\"${{ BRANCH_NAME }}\"}"