Skip to content

Commit

Permalink
chore: working on integrating turborepo remote cache
Browse files Browse the repository at this point in the history
  • Loading branch information
peeter-tomberg committed Jul 16, 2023
1 parent 5b538b9 commit 61a336c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/actions/setup-turborepo-remote-cache/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ outputs:
TURBO_API_FOR_DOCKER:
description: "TURBO_API_FOR_DOCKER"
value: ${{ steps.outputs.outputs.TURBO_API_FOR_DOCKER }}
HOSTNAME:
description: "The hostname"
value: ${{ steps.outputs.outputs.HOSTNAME }}

runs:
using: "composite"
Expand All @@ -36,8 +39,10 @@ runs:
id: outputs
shell: bash
run: |
TURBO_API_FOR_DOCKER=${TURBO_API/0.0.0.0/host.docker.internal}
HOSTNAME=$(hostname -I | awk '{print $1}')
TURBO_API_FOR_DOCKER=${TURBO_API/0.0.0.0/HOSTNAME}
echo "TURBO_TOKEN=$TURBO_TOKEN" >> $GITHUB_OUTPUT
echo "TURBO_TEAMID=$TURBO_TEAM" >> $GITHUB_OUTPUT
echo "TURBO_API=$TURBO_API" >> $GITHUB_OUTPUT
echo "TURBO_API_FOR_DOCKER=$TURBO_API_FOR_DOCKER" >> $GITHUB_OUTPUT
echo "HOSTNAME=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
5 changes: 1 addition & 4 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Get hostname
run: hostname -I | awk '{print $1}'

- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
allow: network.host
add-hosts: host.docker.internal:host-gateway
#add-hosts: host.docker.internal:host-gateway
tags: ${{env.REGISTRY}}/${{matrix.service}}:${{env.DOCKER_TAG}},${{env.REGISTRY}}/${{matrix.service}}:latest
file: tooling/docker/nest/Dockerfile
cache-from: type=registry,ref=${{env.REGISTRY}}/${{matrix.service}}:buildcache
Expand Down

0 comments on commit 61a336c

Please sign in to comment.