Skip to content

Commit

Permalink
fix(ci): pulling image in linting job
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyoptimist committed Oct 28, 2023
1 parent 15705cd commit 4d54b58
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 2 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -26,5 +20,5 @@
# Ignore dotenv file
.env

# Ignore node_modules
/node_modules
# Ignore rubocop report
rubocop.xml
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -299,6 +301,7 @@ GEM

PLATFORMS
aarch64-linux
x86_64-linux

DEPENDENCIES
activerecord (~> 7.0.4)
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ volumes:

services:
web:
image: "${IMAGE_URI}"
build:
target: web
context: .
Expand Down

0 comments on commit 4d54b58

Please sign in to comment.