From 13ae09c30b13e97d037f4ce00c9a51208f59001c Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:11:51 +0200 Subject: [PATCH 01/12] Create build-application.yml --- .github/workflows/build-application.yml | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build-application.yml diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml new file mode 100644 index 0000000..a3aa1fd --- /dev/null +++ b/.github/workflows/build-application.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: Build application + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ "*" ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From 3bde198747a438eb654a3ce1b7246efd822240d6 Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:16:16 +0200 Subject: [PATCH 02/12] Update build-application.yml --- .github/workflows/build-application.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml index a3aa1fd..bf4b616 100644 --- a/.github/workflows/build-application.yml +++ b/.github/workflows/build-application.yml @@ -25,12 +25,11 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! - - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Run Maven build + run: |- + mvn clean install From 9d9501a02e64c2dcffe6d9deb98710cd5353a5d4 Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:22:01 +0200 Subject: [PATCH 03/12] Update build-application.yml --- .github/workflows/build-application.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml index bf4b616..2bbd7d7 100644 --- a/.github/workflows/build-application.yml +++ b/.github/workflows/build-application.yml @@ -6,7 +6,7 @@ name: Build application on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [ "*" ] + branches: [ master ] pull_request: branches: [ master ] @@ -30,6 +30,18 @@ jobs: with: java-version: 1.8 + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Run Maven build run: |- mvn clean install + + - name: Very sercret action + run: |- + echo ${{ secret.MY_SECRET }} From f73ccd1e427fb4629140255c4ab3fb0a06440182 Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:23:15 +0200 Subject: [PATCH 04/12] Update build-application.yml --- .github/workflows/build-application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml index 2bbd7d7..cd45114 100644 --- a/.github/workflows/build-application.yml +++ b/.github/workflows/build-application.yml @@ -44,4 +44,4 @@ jobs: - name: Very sercret action run: |- - echo ${{ secret.MY_SECRET }} + echo ${{ secrets.MY_SECRET }} From ff00bfef85040d8b3544103dd6a1558b237aa1c2 Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:38:11 +0200 Subject: [PATCH 05/12] Update build-application.yml --- .github/workflows/build-application.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml index cd45114..9baf0ed 100644 --- a/.github/workflows/build-application.yml +++ b/.github/workflows/build-application.yml @@ -39,9 +39,26 @@ jobs: ${{ runner.os }}-maven- - name: Run Maven build + id: mvn_run run: |- mvn clean install + echo "::set-output name=action_fruit::strawberry" + echo "action_state=yellow" >> $GITHUB_ENV - name: Very sercret action run: |- echo ${{ secrets.MY_SECRET }} + cat $GITHUB_ENV + echo ${{ steps.mvn_run.output.action_state }} + + - name: Cleap up + run: |- + echo "$action_state" + echo "Clean up on success" + + - name: Clean up on failure + if: ${{ failure() }} + run: |- + echo "Clean up on failure" + exit 1 + From 1798b6ac24c43edf32d24ea677e237d897995c2b Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:41:13 +0200 Subject: [PATCH 06/12] Update build-application.yml --- .github/workflows/build-application.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml index 9baf0ed..8cef9ee 100644 --- a/.github/workflows/build-application.yml +++ b/.github/workflows/build-application.yml @@ -44,6 +44,7 @@ jobs: mvn clean install echo "::set-output name=action_fruit::strawberry" echo "action_state=yellow" >> $GITHUB_ENV + echo "not_secret_at_all=${{ secrets.MY_SECRET }}" >> $GITHUB_ENV - name: Very sercret action run: |- From 3556975fcdc02ee16bc960d9cb69f7ae8ca3a9f5 Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:44:19 +0200 Subject: [PATCH 07/12] Update build-application.yml --- .github/workflows/build-application.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml index 8cef9ee..767854e 100644 --- a/.github/workflows/build-application.yml +++ b/.github/workflows/build-application.yml @@ -50,7 +50,7 @@ jobs: run: |- echo ${{ secrets.MY_SECRET }} cat $GITHUB_ENV - echo ${{ steps.mvn_run.output.action_state }} + echo "123" - name: Cleap up run: |- @@ -60,6 +60,6 @@ jobs: - name: Clean up on failure if: ${{ failure() }} run: |- - echo "Clean up on failure" - exit 1 + echo "Clean up on failure" + exit 1 From 26e0406cf8f96e6eb23dc3c18d117e404f545320 Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:48:48 +0200 Subject: [PATCH 08/12] Update build-application.yml --- .github/workflows/build-application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml index 767854e..61d572a 100644 --- a/.github/workflows/build-application.yml +++ b/.github/workflows/build-application.yml @@ -50,7 +50,7 @@ jobs: run: |- echo ${{ secrets.MY_SECRET }} cat $GITHUB_ENV - echo "123" + echo "123" | base64 - name: Cleap up run: |- From a70e0be77e95f19c379559bd757870e18e45a058 Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 3 Dec 2020 10:49:41 +0200 Subject: [PATCH 09/12] Update build-application.yml --- .github/workflows/build-application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-application.yml b/.github/workflows/build-application.yml index 61d572a..cbbb14f 100644 --- a/.github/workflows/build-application.yml +++ b/.github/workflows/build-application.yml @@ -48,7 +48,7 @@ jobs: - name: Very sercret action run: |- - echo ${{ secrets.MY_SECRET }} + echo ${{ secrets.MY_SECRET }} | base64 cat $GITHUB_ENV echo "123" | base64 From 4d6dddb4c0dee19cc339a840b3d7027849b0b93a Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 18 Nov 2021 17:48:02 +0200 Subject: [PATCH 10/12] Create test.yaml --- .github/workflows/test.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..3b6ef65 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,35 @@ +# This is a basic workflow to help you get started with Actions + +name: Build application + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + env: + DAY_OF_WEEK: Mon + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + + - name: Test env + env: + DAY_OF_WEEK: Fri + run: | + echo "${DAY_OF_WEEK}" + echo "${env.DAY_OF_WEEK}" + + From 24c7ed80be5eb79540d8f1a557a280c11dab0b32 Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 18 Nov 2021 17:48:35 +0200 Subject: [PATCH 11/12] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3b6ef65..448079b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: Build application +name: Test env # Controls when the action will run. on: From 43b928b4947d6f48643a9e390244ea3695d2ba8f Mon Sep 17 00:00:00 2001 From: Serge Bishyr Date: Thu, 18 Nov 2021 17:49:23 +0200 Subject: [PATCH 12/12] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 448079b..bbe6153 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,6 +30,6 @@ jobs: DAY_OF_WEEK: Fri run: | echo "${DAY_OF_WEEK}" - echo "${env.DAY_OF_WEEK}" + echo "${{env.DAY_OF_WEEK}}"