Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix: make docker publish work (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed Nov 24, 2021
1 parent c868025 commit 5d3f9c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -103,11 +103,18 @@ jobs:
trufflesuite/ganache
ghcr.io/${{ github.repository}}
- name: Set TAG and VERSION
run: |
echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "VERSION=$(node -e 'console.log(require("./src/packages/ganache/package.json").version)')" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: ./src/packages/ganache/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ format('trufflesuite/ganache:{0}, trufflesuite/ganache:v{1}', env.TAG, env.VERSION) }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
INFURA_KEY=${{ secrets.INFURA_KEY }}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -15,6 +15,7 @@
"postinstall": "ts-node scripts/postinstall",
"reinstall": "npm run clean && npm install",
"prepublishOnly": "ts-node ./scripts/filter-shrinkwrap.ts \"$(lerna list --parseable --scope ganache)\"/npm-shrinkwrap.json",
"postpublish": "git restore \"$(lerna list --parseable --scope ganache)\"/npm-shrinkwrap.json",
"start": "lerna exec --loglevel=silent --scope ganache -- npm run start --silent -- ",
"test": "lerna exec --concurrency 1 -- npm run test",
"tsc": "ttsc --build src",
Expand Down
3 changes: 3 additions & 0 deletions src/packages/ganache/Dockerfile
Expand Up @@ -9,6 +9,9 @@ COPY . .
RUN npm run clean
RUN npm ci --unsafe-perm

# import INFURA_KEY environment variable (build-arg)
ARG INFURA_KEY

# build application
RUN npm run build

Expand Down

0 comments on commit 5d3f9c4

Please sign in to comment.