From d67a096e494fb2514e57fd29d086cc6c9bd78b48 Mon Sep 17 00:00:00 2001 From: xuan-cao-swi Date: Wed, 24 Jan 2024 10:54:25 -0500 Subject: [PATCH 1/2] NH-66480: update workflow --- .github/workflows/build_for_github_package.yml | 1 - .github/workflows/test_on_4_linux.yml | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_for_github_package.yml b/.github/workflows/build_for_github_package.yml index 5db5afc8..a658156b 100644 --- a/.github/workflows/build_for_github_package.yml +++ b/.github/workflows/build_for_github_package.yml @@ -40,7 +40,6 @@ jobs: - name: Build gem and publish to github package id: gemstep run: | - mkdir ~/.gem echo -e "---\n:github: Bearer $GITHUB_SECRET_TOKEN" >> ~/.gem/credentials chmod 0600 ~/.gem/credentials bundle exec rake build_gem_for_github_package[${{ steps.version.outputs.gem_version }}] diff --git a/.github/workflows/test_on_4_linux.yml b/.github/workflows/test_on_4_linux.yml index 7c691f16..bbd7c116 100644 --- a/.github/workflows/test_on_4_linux.yml +++ b/.github/workflows/test_on_4_linux.yml @@ -88,7 +88,13 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 steps: + - name: Checkout ${{ github.ref }} + if: ${{ matrix.os == 'amzlinux' }} + uses: actions/checkout@v3 + + - name: Checkout ${{ github.ref }} + if: ${{ matrix.os != 'amzlinux' }} uses: actions/checkout@v4 - name: print some info From e280d708943bfec8151c2570dc0ba982e9bad7a4 Mon Sep 17 00:00:00 2001 From: xuan-cao-swi Date: Wed, 24 Jan 2024 16:48:30 -0500 Subject: [PATCH 2/2] NH-66480: create gem but not create if exist --- .github/workflows/build_for_github_package.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_for_github_package.yml b/.github/workflows/build_for_github_package.yml index a658156b..541d8c02 100644 --- a/.github/workflows/build_for_github_package.yml +++ b/.github/workflows/build_for_github_package.yml @@ -40,6 +40,9 @@ jobs: - name: Build gem and publish to github package id: gemstep run: | + cd ~ + [ -d '.gem' ] || mkdir .gem && echo "Directory created or already exists." + cd - echo -e "---\n:github: Bearer $GITHUB_SECRET_TOKEN" >> ~/.gem/credentials chmod 0600 ~/.gem/credentials bundle exec rake build_gem_for_github_package[${{ steps.version.outputs.gem_version }}]