From 4d54b58856a46824eef62825f0be3f8875e3be56 Mon Sep 17 00:00:00 2001 From: crazyoptimist Date: Sat, 28 Oct 2023 04:53:54 -0500 Subject: [PATCH] fix(ci): pulling image in linting job --- .github/workflows/build-lint.yaml | 11 ++++++----- .gitignore | 10 ++-------- Gemfile.lock | 3 +++ docker-compose.yaml | 1 + 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-lint.yaml b/.github/workflows/build-lint.yaml index 838a24f..15ad175 100644 --- a/.github/workflows/build-lint.yaml +++ b/.github/workflows/build-lint.yaml @@ -3,7 +3,8 @@ run-name: Build & Lint of ${{ github.ref_name }} by @${{ github.actor }} on: push: branches: - - postgres + # - postgres + - ci/configure-lint pull_request: branches: - postgres @@ -92,17 +93,17 @@ jobs: password: ${{ secrets.PAT }} - name: Pull web image to prevent build + env: + IMAGE_URI: '${{ env.REGISTRY }}/${{ env.GITHUB_REPOSITORY }}:${{ env.TAG }}' run: >- - touch .env; - docker compose pull web + docker compose pull "$IMAGE_URI" - name: Run Rubocop run: >- [ -f "db/schema.rb" ] && chmod 777 db/schema.rb; - docker compose pull web; docker compose run -T web sh -c "bundle exec rubocop --parallel --format junit --out rubocop.xml" - - name: Publish Test Report + - name: Publish Linting Report uses: mikepenz/action-junit-report@v3 if: always() # always run even if the previous step fails with: diff --git a/.gitignore b/.gitignore index 2f3ed8d..257fde8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - # Ignore bundler config. /.bundle @@ -26,5 +20,5 @@ # Ignore dotenv file .env -# Ignore node_modules -/node_modules +# Ignore rubocop report +rubocop.xml diff --git a/Gemfile.lock b/Gemfile.lock index 0642033..f61eed6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -179,6 +179,8 @@ GEM nio4r (2.5.9) nokogiri (1.15.4-aarch64-linux) racc (~> 1.4) + nokogiri (1.15.4-x86_64-linux) + racc (~> 1.4) otr-activerecord (2.2.0) activerecord (>= 4.0, < 7.2) hashie-forbidden_attributes (~> 0.1) @@ -299,6 +301,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES activerecord (~> 7.0.4) diff --git a/docker-compose.yaml b/docker-compose.yaml index 66fe654..9b6e12a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,6 +5,7 @@ volumes: services: web: + image: "${IMAGE_URI}" build: target: web context: .