From c7172fe80007684b261ecf40a4005e4a8ace91b7 Mon Sep 17 00:00:00 2001 From: seungo Date: Wed, 17 Jan 2024 21:41:38 +0900 Subject: [PATCH] ci: fix workflow --- .github/workflows/build.yml | 29 ++++++++++++++++++++++ .github/workflows/development-pipeline.yml | 14 +++-------- 2 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e91d94c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +run-name: Build +on: + workflow_call: + secrets: + DOCKER_USERNAME: + required: true + DOCKER_PASSWORD: + required: true + +jobs: + Run: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Docker login + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build application + run: yarn build:docker diff --git a/.github/workflows/development-pipeline.yml b/.github/workflows/development-pipeline.yml index 63de070..b11697e 100644 --- a/.github/workflows/development-pipeline.yml +++ b/.github/workflows/development-pipeline.yml @@ -23,13 +23,7 @@ jobs: build: needs: [lint_test, unit_test] - runs-on: ubuntu-latest - steps: - - name: Docker login - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build application - run: yarn build:docker + uses: ./.github/workflows/build.yml + secrets: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}