Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol committed Jun 26, 2024
1 parent 2e7f823 commit 2e2a60c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-env-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
Expand Down Expand Up @@ -55,6 +58,7 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64

# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
- name: Generate artifact attestation
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/protobuf-reprolang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:

- run: docker pull ghcr.io/sourcegraph/scip:latest || echo "no suitable cache"

- run: sudo chown -R 1001:1001 . && ./dev/generate-all-in-docker.sh
- run: |
# We're changing the owner of the checkout folder to a particular user id,
# matching the user id of `asdf` user we create inside the docker container.
sudo chown -R 1001:1001 . && ./dev/generate-all-in-docker.sh
- run: git diff --exit-code
16 changes: 0 additions & 16 deletions dev/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,6 @@

set -xeuo pipefail

# We're explicitly overriding the node_modules location used by Yarn because
# of issues when mounting node_modules inside the docker container AND running
# it under non-root user.

# Symlinking won't work: https://github.com/yarnpkg/yarn/issues/8079#issuecomment-622817604
# node_modules mounting is a known issue: https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder

CUSTOM_NODE_MODULES="$HOME/my-node-modules"

mkdir -p $CUSTOM_NODE_MODULES && chmod 0777 $CUSTOM_NODE_MODULES && chown -R asdf:asdf $CUSTOM_NODE_MODULES

echo "--modules-folder $CUSTOM_NODE_MODULES" > $HOME/.yarnrc

export PATH="$PATH:$CUSTOM_NODE_MODULES/.bin"
export NODE_PATH="$CUSTOM_NODE_MODULES"

./dev/proto-generate.sh

./cmd/scip/tests/reprolang/generate-tree-sitter-parser.sh

0 comments on commit 2e2a60c

Please sign in to comment.