Skip to content

Commit

Permalink
feat: added support for pnpm (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Jun 28, 2024
1 parent 77298ea commit ac4f724
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set tag variable
id: set_tag
run: echo ::set-output name=tag::$(if [ "${{ github.event_name }}" == 'release' ]; then echo "${{ github.ref_name }}"; else echo "0.0.0-dev"; fi)

- name: Build and publish to Docker Hub
uses: docker/build-push-action@v2
timeout-minutes: 60
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: "nhost/functions:18-${{ github.ref_name }}"
push: ${{ github.event_name == 'release' }}
tags: "nhost/functions:20-${{ steps.set_tag.outputs.tag }}"
file: 18.Dockerfile

- name: Build and publish to Docker Hub
Expand All @@ -50,6 +54,6 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: "nhost/functions:20-${{ github.ref_name }}"
push: ${{ github.event_name == 'release' }}
tags: "nhost/functions:20-${{ steps.set_tag.outputs.tag }}"
file: 20.Dockerfile
6 changes: 3 additions & 3 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ else
fi
fi

# if neither package-lock.json nor yarn.lock exists, error
if [ ! -f "$FUNCTIONS_WORKING_DIR/package-lock.json" ] && [ ! -f "$FUNCTIONS_WORKING_DIR/yarn.lock" ]; then
echo "No lock file found. Please commit your lock file for npm or yarn"
# if neither package-lock.json nor yarn.lock exists nor pnpm-lock.yaml, error
if [ ! -f "$FUNCTIONS_WORKING_DIR/package-lock.json" ] && [ ! -f "$FUNCTIONS_WORKING_DIR/yarn.lock" ] && [ ! -f "$FUNCTIONS_WORKING_DIR/pnpm-lock.yaml" ]; then
echo "No lock file found. Please commit your lock file for npm, yarn, or pnpm"
exit 1
fi

Expand Down

0 comments on commit ac4f724

Please sign in to comment.