From 5d4f3703752ac62e7362962b6c30bd744bbd7d3a Mon Sep 17 00:00:00 2001 From: Rainer Burgstaller Date: Tue, 19 Mar 2024 05:53:09 +0100 Subject: [PATCH 1/5] wip: test event --- .github/workflows/test.yml | 21 +++++++++++++++++++++ .gitignore | 1 + .idea/.gitignore | 10 ++++++++++ 3 files changed, 32 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 .idea/.gitignore diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..79fd3ed --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +on: + - pull_request + - push + +jobs: + task1_job: + name: first task + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: show context + run: | + echo "context ${{ github.event }}" + - name: list PR branches + run: | + echo "PR branch base ref: ${{ github.event.pull_request.base.ref }} head ref: ${{ github.event.pull_request.head.ref }} + if: github.event_name == 'pull_request' + - name: list push branches + run: | + echo "Push branch ref: ${{ github.ref }}" + if: github.event_name == 'push' diff --git a/.gitignore b/.gitignore index e69de29..723ef36 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..a9d7db9 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# GitHub Copilot persisted chat sessions +/copilot/chatSessions From 7ab036cc86f8ad54d674dd96f22827663f9ff47d Mon Sep 17 00:00:00 2001 From: Rainer Burgstaller Date: Tue, 19 Mar 2024 05:59:57 +0100 Subject: [PATCH 2/5] wip: tojson --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79fd3ed..1f18971 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - name: show context run: | - echo "context ${{ github.event }}" + echo "context ${{ toJSON(github.event) }}" - name: list PR branches run: | echo "PR branch base ref: ${{ github.event.pull_request.base.ref }} head ref: ${{ github.event.pull_request.head.ref }} From 6a3af4e3333d61d12d76298a81b13112533d18bb Mon Sep 17 00:00:00 2001 From: Rainer Burgstaller Date: Tue, 19 Mar 2024 06:01:37 +0100 Subject: [PATCH 3/5] wip: add event name --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f18971..9403623 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,8 @@ jobs: - uses: actions/checkout@v4 - name: show context run: | - echo "context ${{ toJSON(github.event) }}" + echo "github.event_name ${{ github.event_name }}" + echo "github.event ${{ toJSON(github.event) }}" - name: list PR branches run: | echo "PR branch base ref: ${{ github.event.pull_request.base.ref }} head ref: ${{ github.event.pull_request.head.ref }} From 2efbabb83dfc42c48fbe532c24f13ad10cd44633 Mon Sep 17 00:00:00 2001 From: Rainer Burgstaller Date: Tue, 19 Mar 2024 06:07:16 +0100 Subject: [PATCH 4/5] wip: print sha --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9403623..383cd38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,9 +14,9 @@ jobs: echo "github.event ${{ toJSON(github.event) }}" - name: list PR branches run: | - echo "PR branch base ref: ${{ github.event.pull_request.base.ref }} head ref: ${{ github.event.pull_request.head.ref }} + echo "PR branch base ref: ${{ github.event.pull_request.base.ref }} head ref: ${{ github.event.pull_request.head.ref }}" if: github.event_name == 'pull_request' - name: list push branches run: | - echo "Push branch ref: ${{ github.ref }}" + echo "Push branch ref: ${{ github.ref }} commit: $env.GITHUB_SHA" if: github.event_name == 'push' From 4b584eaf8e6e2eaa36f27c054899bbacbc39c5d0 Mon Sep 17 00:00:00 2001 From: Rainer Burgstaller Date: Tue, 19 Mar 2024 06:29:59 +0100 Subject: [PATCH 5/5] feat: task 1 done --- .github/workflows/test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 383cd38..c257fe9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,15 +8,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: show context - run: | - echo "github.event_name ${{ github.event_name }}" - echo "github.event ${{ toJSON(github.event) }}" - name: list PR branches run: | echo "PR branch base ref: ${{ github.event.pull_request.base.ref }} head ref: ${{ github.event.pull_request.head.ref }}" if: github.event_name == 'pull_request' - name: list push branches run: | - echo "Push branch ref: ${{ github.ref }} commit: $env.GITHUB_SHA" + echo "Push branch ref: ${{ github.ref }} commit: $GITHUB_SHA" if: github.event_name == 'push' + - name: list files in repo + run: ls -laR \ No newline at end of file