From b36bbfd8c59b3dad2b8dabe7c0b7c192d1c6c401 Mon Sep 17 00:00:00 2001 From: yjf2002ghty <47345902+yjf2002ghty@users.noreply.github.com> Date: Sat, 2 Nov 2024 20:49:34 +0800 Subject: [PATCH] Create test.yml --- .github/workflows/test.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..32254ee0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +name: Example Workflow + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + print-urls: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Print repository URL + run: | + echo "Repository URL: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" + + - name: Print Pull Request URL + if: github.event_name == 'pull_request' + run: | + echo "Pull Request URL: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${{ github.event.pull_request.number }}" + + - name: Print source and target branch names + run: | + echo "Source Branch: ${{ github.event.pull_request.head.ref }}" + echo "Target Branch: ${{ github.event.pull_request.base.ref }}"