Skip to content

update_version

update_version #1525

name: update_version
on:
schedule:
- cron: "0 19 * * *" # JST 4:00
workflow_dispatch:
jobs:
update_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Setup git
run: |
git config push.default current
git config user.name github-actions
git config user.email github-actions@github.com
- name: Update VERSION
run: |
set -xe
npm info heroku versions --json | jq --raw-output 'map(select(test("^\\d+\\.\\d+\\.\\d+$"))) | last' > VERSION
VERSION=$(cat VERSION)
git add VERSION
sed -i -e "s/ENV HEROKU_CLI_VERSION .*$/ENV HEROKU_CLI_VERSION ${VERSION}/g" Dockerfile
git add Dockerfile
set +e
git commit -m "Bump version ${VERSION} from GitHub Actions"
git tag -a ${VERSION} -m "Release ${VERSION}"
git push origin --tags
set -e
git push origin
- name: Slack Notification (not success)
uses: act10ns/slack@v2
if: "! success()"
continue-on-error: true
with:
status: ${{ job.status }}
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
build:
needs:
- update_version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
- run: docker compose --file docker-compose.test.yml build
- run: docker compose --file docker-compose.test.yml run sut
- name: Slack Notification (not success)
uses: act10ns/slack@v2
if: "! success()"
continue-on-error: true
with:
status: ${{ job.status }}
webhook-url: ${{ secrets.SLACK_WEBHOOK }}