From 2f28633e91f3d08b4f81f04e03131c518b2f5838 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Sun, 22 Oct 2023 18:22:40 -0700 Subject: [PATCH 1/2] Adds ghas and updates dockerfile and dc file to use a target called web --- .github/workflows/build-test-lint.yaml | 36 ++++++++++++++++++++++++++ Dockerfile | 2 +- docker-compose.yaml | 4 ++- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build-test-lint.yaml diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml new file mode 100644 index 0000000..8513e0d --- /dev/null +++ b/.github/workflows/build-test-lint.yaml @@ -0,0 +1,36 @@ +name: 'Build Test Lint' +run-name: Build Test Lint of ${{ github.ref_name }} by @${{ github.actor }} +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + build: + uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.14 + secrets: inherit + with: + platforms: 'linux/amd64' + webTarget: web + + # test: + # needs: build + # uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.14 + # with: + # webTarget: + + # lint: + # needs: build + # uses: scientist-softserv/actions/.github/workflows/lint.yaml@v0.0.14 + # with: + # webTarget: \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 2a95304..306de04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.1.3 +FROM ruby:3.1.3 as web WORKDIR /app COPY Gemfile* ./ diff --git a/docker-compose.yaml b/docker-compose.yaml index 9ba5f3c..7efb68d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,7 +6,9 @@ volumes: services: web: - build: . + build: + target: web + context: . volumes: - "./:/app/" - "./log:/app/log" From cc9271369e50c3610899da7318641a5f73e19e80 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Sun, 22 Oct 2023 18:27:07 -0700 Subject: [PATCH 2/2] adds deploy action so i can use it on a branch to fine tune things before commiting the rest of the files --- .github/workflows/deploy.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..1b49fb9 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,23 @@ +name: "Deploy" +run-name: Deploy (${{ github.ref_name }} -> ${{ inputs.environment }}) by @${{ github.actor }} +on: + workflow_dispatch: + inputs: + environment: + description: 'Deploy to Environment' + required: true + default: 'staging' + type: choice + options: + - staging + # - production + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + deploy: + uses: scientist-softserv/actions/.github/workflows/deploy.yaml@v0.0.14 + secrets: inherit \ No newline at end of file