From b5e0f35b0d98a81e89e83df1115689507180a747 Mon Sep 17 00:00:00 2001 From: Takuya Mikami Date: Thu, 15 Jul 2021 09:44:34 +0900 Subject: [PATCH] Auto update jpostcode-data on Github Actions --- .github/workflows/jpostcode-data.yml | 37 ++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/jpostcode-data.yml diff --git a/.github/workflows/jpostcode-data.yml b/.github/workflows/jpostcode-data.yml new file mode 100644 index 00000000..1ea716a7 --- /dev/null +++ b/.github/workflows/jpostcode-data.yml @@ -0,0 +1,37 @@ +name: jpostcode-data + +on: + repository_dispatch: + types: [update-jpostcode-data] + +jobs: + update-jpostcode-data: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + with: + submodules: recursive + - name: Setup Ruby + uses: ruby/setup-ruby@v1.77.0 + with: + bundler-cache: true + - name: Submodule Update + run: git submodule update --remote --recursive + - name: Update Gem Version + run: | + TIMESTAMP=`date +"%Y%m%d"` + sed -i "" -e "s/^\( \+VERSION = '[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\.\)[0-9]\{8\}'$/\1${TIMESTAMP}'/g" lib/jpostcode/version.rb + - name: Update Gemfile.lock + run: | + bundle config unset deployment + bundle update --conservative jpostcode + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3.10.0 + with: + base: master + branch: bump_jpostcode-rb + branch-suffix: timestamp + delete-branch: true + title: Bump Version + commit-message: update jpostcode-data diff --git a/.gitignore b/.gitignore index 9106b2a3..30c321c0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /pkg/ /spec/reports/ /tmp/ +/vendor/bundle/