Skip to content

trying out things

trying out things #421

Workflow file for this run

name: lrda_desktop CI
on:
push:
branches:
- main
- openai_tags
- aws-secret
- memoryleak
pull_request:
branches:
- main
- openai_tags
- aws-secret
- memoryleak
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x] # Adjust according to your project's Node.js version
steps:
- uses: actions/checkout@v2
# Set up Node.js environment
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# Install pnpm globally
- name: Install pnpm
run: npm install -g [email protected]
# Install dependencies
- name: Install dependencies
run: pnpm install # Replace 'npm install' with 'pnpm install'
# Run your tests
- name: Run tests
run: pnpm test # or 'npm test' if you're using npm
docker:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# Log in to DockerHub using credentials stored in GitHub Secrets
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Build and push the Docker image with build arguments for environment variables
- name: Build and push Docker image
run: |
docker build \
--build-arg NEXT_PUBLIC_MAP_KEY=${{ secrets.NEXT_PUBLIC_MAP_KEY }} \
--build-arg NEXT_PUBLIC_S3_PROXY_PREFIX=${{ secrets.NEXT_PUBLIC_S3_PROXY_PREFIX }} \
--build-arg NEXT_PUBLIC_RERUM_PREFIX=${{ secrets.NEXT_PUBLIC_RERUM_PREFIX }} \
--build-arg NEXT_PUBLIC_PLACES_KEY=${{ secrets.NEXT_PUBLIC_PLACES_KEY }} \
--build-arg NEXT_PUBLIC_ADMIN_PASKEY=${{ secrets.NEXT_PUBLIC_ADMIN_PASKEY }} \
--build-arg API_PORT=${{ secrets.API_PORT }} \
--build-arg NEXT_PUBLIC_FIREBASE_API_KEY=${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }} \
--build-arg NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }} \
--build-arg NEXT_PUBLIC_FIREBASE_PROJECT_ID=${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }} \
--build-arg NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }} \
--build-arg NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }} \
--build-arg NEXT_PUBLIC_FIREBASE_APP_ID=${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} \
--build-arg NEXT_PUBLIC_OPENAI_API_KEY=${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }} \
--build-arg NEXT_PUBLIC_OPENAI_API_URL=${{ secrets.NEXT_PUBLIC_OPENAI_API_URL }} \
--build-arg RERUM_PREFIX=${{ secrets.RERUM_PREFIX }} \
-t ${{ secrets.DOCKER_USERNAME }}/wheres_religion:${{ github.sha }} .
# Push the image to DockerHub
docker push ${{ secrets.DOCKER_USERNAME }}/wheres_religion:${{ github.sha }}
# Optionally, tag and push the 'latest' version of the image
- name: Tag and push latest Docker image
run: |
docker tag ${{ secrets.DOCKER_USERNAME }}/wheres_religion:${{ github.sha }} ${{ secrets.DOCKER_USERNAME }}/wheres_religion:latest
docker push ${{ secrets.DOCKER_USERNAME }}/wheres_religion:latest