Skip to content

Commit

Permalink
Use test close
Browse files Browse the repository at this point in the history
  • Loading branch information
danielxnj committed Nov 29, 2023
1 parent b6ef55f commit 89b15a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 37 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/container-images-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
permissions:
id-token: write # allow issuing OIDC tokens for this workflow run
contents: read # allow at least reading the repo contents, add other permissions if necessary

steps:
# If this run wasn't initiated by PostHog Bot (meaning: snapshot update),
# cancel previous runs of snapshot update-inducing workflows
Expand All @@ -39,12 +39,12 @@ jobs:
with:
actions-id-token-request-url: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL }}

deploy_preview:
name: Deploy preview environment
uses: ./.github/workflows/pr-deploy.yml
needs: [posthog_build]
secrets: inherit
if: ${{ contains(github.event.pull_request.labels.*.name, 'deploy') }}
# deploy_preview:
# name: Deploy preview environment
# uses: ./.github/workflows/pr-deploy.yml
# needs: [posthog_build]
# secrets: inherit
# if: ${{ contains(github.event.pull_request.labels.*.name, 'deploy') }}

lint:
name: Lint changed Dockerfiles
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pr-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: PR - Preview Deploy Cleanup

on:
pull_request:
types: [closed]
# types: [closed]

jobs:
deploy_preview_cleanup:
Expand All @@ -20,8 +20,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: posthog

- uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down Expand Up @@ -58,10 +56,10 @@ jobs:
export REGISTRY_URL=${{ steps.aws-ecr.outputs.registry }}/pr-test
export DOCKER_TAG=${{ github.event.pull_request.head.sha }}
envsubst < posthog/.github/pr-deploy/hobby.yaml.tmpl > posthog/.github/pr-deploy/hobby.yaml
envsubst < .github/pr-deploy/hobby.yaml.tmpl > .github/pr-deploy/hobby.yaml
#Clean and deploy
kubectl -n $NAMESPACE delete -f posthog/.github/pr-deploy/hobby.yaml || true
kubectl -n $NAMESPACE delete -f .github/pr-deploy/hobby.yaml || true
- name: delete deployment
uses: bobheadxi/[email protected]
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/pr-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,6 @@ jobs:
id: aws-ecr
uses: aws-actions/amazon-ecr-login@v1

# - name: Build and cache Docker image in Depot
# uses: ./.github/actions/build-n-cache-image
# with:
# actions-id-token-request-url: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL }}

# - name: Build pr test image
# id: build-unit
# uses: depot/build-push-action@v1
# with:
# buildx-fallback: false # buildx is so slow it's better to just fail
# push: false
# tags: posthog/posthog:pr-test-${{ github.event.pull_request.head.sha }}
# platforms: linux/amd64,linux/arm64
# build-args: COMMIT_HASH=${{ github.event.pull_request.head.sha }}

# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# push: true
# tags: ${{ steps.aws-ecr.outputs.registry }}/pr-test:${{ github.event.pull_request.head.sha }}
# build-args: COMMIT_HASH=${{ github.event.pull_request.head.sha }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
# platforms: linux/amd64,linux/arm64

- name: Build and push PR test image
id: build-unit
uses: depot/build-push-action@v1
Expand Down

0 comments on commit 89b15a3

Please sign in to comment.