Compare commits

..

1 Commits

Author SHA1 Message Date
actions-user
065a755a0a tag version Cal.com version v3.3.2 2023-09-19 21:04:28 +00:00
3 changed files with 12 additions and 91 deletions

View File

@@ -39,7 +39,6 @@ jobs:
with: with:
github-token: "${{ secrets.ACTIONS_ACCESS_TOKEN }}" github-token: "${{ secrets.ACTIONS_ACCESS_TOKEN }}"
script: | script: |
const isPreRelease = '${{ inputs.RELEASE_TAG }}'.includes('-rc');
try { try {
const response = await github.rest.repos.createRelease({ const response = await github.rest.repos.createRelease({
draft: false, draft: false,
@@ -48,7 +47,7 @@ jobs:
name: '${{ inputs.RELEASE_TAG }}', name: '${{ inputs.RELEASE_TAG }}',
target_commitish: 'release-${{ inputs.RELEASE_TAG }}', target_commitish: 'release-${{ inputs.RELEASE_TAG }}',
owner: context.repo.owner, owner: context.repo.owner,
prerelease: isPreRelease, prerelease: false,
repo: context.repo.repo, repo: context.repo.repo,
tag_name: '${{ inputs.RELEASE_TAG }}', tag_name: '${{ inputs.RELEASE_TAG }}',
}); });

View File

@@ -17,11 +17,6 @@ on:
- completed - completed
# Allow running workflow manually from the Actions tab # Allow running workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
# Uncomment below to allow specific version workflow run
# inputs:
# version:
# description: 'Version to build'
# required: true
# Leaving in example for releases. Initially we simply push to 'latest' # Leaving in example for releases. Initially we simply push to 'latest'
# on: # on:
@@ -37,12 +32,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it, uncomment below # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - name: Checkout code at specified version
# uses: actions/checkout@v2
# with:
# ref: ${{ github.event.inputs.version }}
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@@ -75,10 +65,6 @@ jobs:
docker.io/calendso/calendso docker.io/calendso/calendso
docker.io/calcom/cal.com docker.io/calcom/cal.com
ghcr.io/calcom/cal.com ghcr.io/calcom/cal.com
# Add flavor latest only on full releases, not on pre-releases
flavor: |
latest=${{ !github.event.release.prerelease }}
prerelease=${{ github.event.release.prerelease }}
- name: Copy env - name: Copy env
run: | run: |
@@ -106,14 +92,13 @@ jobs:
# [worker.oci] # [worker.oci]
# max-parallelism = 1 # max-parallelism = 1
- name: Build image - name: Build and push image
id: docker_build id: docker_build
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
context: ./ context: ./
file: ./Dockerfile file: ./Dockerfile
load: true # Load the image into the Docker daemon push: ${{ github.event_name != 'pull_request' }}
push: false # Do not push the image at this stage
platforms: linux/amd64 platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
@@ -123,76 +108,13 @@ jobs:
NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }} NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }}
DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }} DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
- name: Test runtime # - name: Build with docker compose
run: |
tags="${{ steps.meta.outputs.tags }}"
IFS=',' read -ra ADDR <<< "$tags" # Convert string to array using ',' as delimiter
tag=${ADDR[0]} # Get the first tag
docker run --rm --network stack \
-p 3000:3000 \
-e DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@database/${{ env.POSTGRES_DB }} \
-e NEXTAUTH_SECRET=${{ env.NEXTAUTH_SECRET }} \
-e CALENDSO_ENCRYPTION_KEY=${{ env.CALENDSO_ENCRYPTION_KEY }} \
$tag &
server_pid=$!
echo "Waiting for the server to start..."
sleep 120
echo ${{ env.NEXT_PUBLIC_WEBAPP_URL }}/auth/login
for i in {1..60}; do
echo "Checking server health ($i/60)..."
response=$(curl -o /dev/null -s -w "%{http_code}" ${{ env.NEXT_PUBLIC_WEBAPP_URL }}/auth/login)
echo "HTTP Status Code: $response"
if [[ "$response" == "200" ]] || [[ "$response" == "307" ]]; then
echo "Server is healthy"
# Now, shutdown the server
kill $server_pid
exit 0
fi
sleep 1
done
echo "Server health check failed"
kill $server_pid
exit 1
env:
NEXTAUTH_SECRET: 'EI4qqDpcfdvf4A+0aQEEx8JjHxHSy4uWiZw/F32K+pA='
CALENDSO_ENCRYPTION_KEY: '0zfLtY99wjeLnsM7qsa8xsT+Q0oSgnOL'
# - name: Push image
# run: | # run: |
# tags="${{ steps.meta.outputs.tags }}" # DOCKER_BUILDKIT=0 docker compose build --build-arg DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }} calcom
# IFS=',' read -ra ADDR <<< "$tags" # Convert string to array using ',' as delimiter
# for tag in "${ADDR[@]}"; do
# docker push $tag
# done
- name: Push image
id: docker_push
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }}
NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}
NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }}
DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
if: ${{ !github.event.release.prerelease }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Cleanup - name: Cleanup
run: | run: |
docker compose down docker compose down
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

2
calcom

Submodule calcom updated: df91dacc3f...37f01db0da