Skip to content

Commit

Permalink
pls make it stahp
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol committed Jun 26, 2024
1 parent 70dd331 commit a96164a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-env-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Create and publish a Docker image for bindings build environment
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['docker-for-bindings-generator'] # TODO: set to main
branches: ['main'] # TODO: set to main

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'docker-for-bindings-generator') }} # TODO: set to main
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} # TODO: set to main
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/protobuf-reprolang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- run: ./dev/generate-all-in-docker.sh
- run: git diff --exit-code
10 changes: 7 additions & 3 deletions dev/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ set -xeuo pipefail
# 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

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

export PATH="$PATH:$HOME/my-node-modules/.bin"
export NODE_PATH="$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

Expand Down
2 changes: 1 addition & 1 deletion dev/generate-all-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ cd "$(dirname "${BASH_SOURCE[0]}")/.." # cd to repo root dir

IMAGE_NAME=$(./dev/build-docker-environment.sh)

docker run -v $(pwd):/src -v /src/node_modules $IMAGE_NAME
docker run -v $(pwd):/src $IMAGE_NAME

0 comments on commit a96164a

Please sign in to comment.