From 402e2d58a0fc740fcc5bc1ff1e733536858f3e78 Mon Sep 17 00:00:00 2001 From: Marcin Kondrat Date: Mon, 25 Nov 2024 16:38:30 +0100 Subject: [PATCH 1/2] chore(github): add GitHub Actions configuration file for CI setup --- .github/config.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/config.yml diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 0000000..e69de29 From 50ea5bb65c562a574eedd068e929f623992939d8 Mon Sep 17 00:00:00 2001 From: Marcin Kondrat Date: Mon, 25 Nov 2024 16:43:34 +0100 Subject: [PATCH 2/2] chore(workflows): remove auto-pr.yml workflow as it is no longer needed for the project --- .github/workflows/auto-pr.yml | 43 ----------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .github/workflows/auto-pr.yml diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml deleted file mode 100644 index 5b03b90..0000000 --- a/.github/workflows/auto-pr.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Auto Create PR - -on: - push: - branches: - - 'feature/*' - -jobs: - create-pr: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up GitHub CLI - run: | - sudo apt-get update - sudo apt-get install gh - - - name: Check if PR exists - id: pr-check - run: | - echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token - PR_EXISTS=$(gh pr list --base main --head ${GITHUB_REF#refs/heads/} --json number --jq 'length') - echo "PR_EXISTS=$PR_EXISTS" >> $GITHUB_ENV - unset GH_TOKEN - - - name: Create PR if not exists - if: env.PR_EXISTS == '0' - run: | - PR_TITLE="PR from ${GITHUB_REF#refs/heads/} to main" - PR_BODY="This PR was created automatically by GitHub Actions. Changes made in commit ${GITHUB_SHA} by ${GITHUB_ACTOR}." - - BASE_BRANCH="main" - HEAD_BRANCH="${GITHUB_REF#refs/heads/}" - - echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token - gh pr create --base $BASE_BRANCH --head $HEAD_BRANCH --title "$PR_TITLE" --body "$PR_BODY" - unset GH_TOKEN \ No newline at end of file