Skip to content

Commit

Permalink
ci: use the docker run pattern for the generic-package job
Browse files Browse the repository at this point in the history
so now we do the same thing for all the packaging jobs.

Also set up a git 'safe.directory' config in the `test-gem-build`
script to avoid the fatal: detected dubious ownership in repository"
errors from git.
  • Loading branch information
flavorjones committed Sep 17, 2023
1 parent 2adedd4 commit 7d89f03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,18 +401,20 @@ jobs:
needs: ["rcd_image_version"]
name: "generic-package"
runs-on: ubuntu-latest
container:
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-x86_64-linux"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: git config --global --add safe.directory /__w/nokogiri/nokogiri # shrug
- uses: actions/cache@v3
with:
path: ports/archives
key: tarballs-ubuntu-${{hashFiles('dependencies.yml', 'patches/**/*.patch')}}
- run: ./scripts/test-gem-build gems ruby
- env:
DOCKER_IMAGE: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-x86_64-linux"
run: |
docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \
${DOCKER_IMAGE} \
./scripts/test-gem-build gems ruby
- uses: actions/upload-artifact@v3
with:
name: generic-gem
Expand Down
3 changes: 3 additions & 0 deletions scripts/test-gem-build
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ test -e /etc/os-release && cat /etc/os-release

set -u -x

# avoid the pernicious "fatal: detected dubious ownership in repository" errors
git config --global --add safe.directory $(realpath $(dirname $0)/..)

bundle

bundle exec rake set-version-to-timestamp
Expand Down

0 comments on commit 7d89f03

Please sign in to comment.