diff --git a/.github/actions/install-embulk/action.yml b/.github/actions/install-embulk/action.yml new file mode 100644 index 0000000..c8690ba --- /dev/null +++ b/.github/actions/install-embulk/action.yml @@ -0,0 +1,24 @@ +name: "Download Embulk" + +inputs: + version: + description: "Version of Embulk to download" + type: string + required: true + +runs: + using: "composite" + steps: + - name: checkout + uses: actions/checkout@v4 + + - id: url + name: Fix the download URL + env: + EMBULK_VERSION: ${{ inputs.version }} + run: echo "download_url=https://github.com/embulk/embulk/releases/download/v${EMBULK_VERSION}/embulk-${EMBULK_VERSION}.jar" >> $GITHUB_OUTPUT + - id: download + name: Download the Embulk executable binary + env: + EMBULK_URL: ${{ steps.url.outputs.download_url }} + run: echo ${EMBULK_URL} diff --git a/.github/workflows/input-postgresql.yml b/.github/workflows/input-postgresql.yml index ca6cf11..8dfff26 100644 --- a/.github/workflows/input-postgresql.yml +++ b/.github/workflows/input-postgresql.yml @@ -5,6 +5,11 @@ on: schedule: - cron: "0 18 * * *" # 3am in Asia/Tokyo jobs: + download: + uses: ./.github/workflows/install-embulk.yml + with: + version: "0.11.4" + check: runs-on: ubuntu-latest # push: always run. @@ -19,3 +24,6 @@ jobs: with: java-version: 8 distribution: "temurin" + - uses: ./.github/actions/install-embulk + with: + version: "0.11.4" diff --git a/.github/workflows/install-embulk.yml b/.github/workflows/install-embulk.yml new file mode 100644 index 0000000..c944bd3 --- /dev/null +++ b/.github/workflows/install-embulk.yml @@ -0,0 +1,24 @@ +name: Download Embulk + +on: + workflow_call: + inputs: + version: + description: "Version of Embulk to download" + type: string + required: true + +jobs: + download-embulk: + runs-on: ubuntu-latest + steps: + - id: url + name: Fix the download URL + env: + EMBULK_VERSION: ${{ github.event.inputs.version }} + run: echo "download_url=https://github.com/embulk/embulk/releases/download/v${EMBULK_VERSION}/embulk-${EMBULK_VERSION}.jar" >> $GITHUB_OUTPUT + - id: download + name: Download the Embulk executable binary + env: + EMBULK_URL: ${{ steps.url.outputs.download_url }} + run: echo ${EMBULK_URL}