0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 13:39:22 +01:00

Revert "feat(ci): use Depot for Docker builds in CI (#10002)" (#10179)

This reverts commit be605eeadb.
This commit is contained in:
Tim Glaser 2022-06-07 19:57:18 +01:00 committed by GitHub
parent c0ccc1fef8
commit efb1eb21f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 43 deletions

View File

@ -14,9 +14,6 @@ jobs:
runs-on: ubuntu-20.04
# TODO: Don't sync until ee code relocation is done
if: ${{false}}
permissions:
contents: read
id-token: write
steps:
- name: Checkout default branch
if: github.repository == 'PostHog/posthog-foss'
@ -30,9 +27,13 @@ jobs:
if: github.repository == 'PostHog/posthog-foss'
run: echo "GIT_SHA = '${GITHUB_SHA}'" > posthog/gitsha.py
- name: Set up Depot CLI
- name: Set up QEMU
if: github.repository == 'PostHog/posthog-foss'
uses: depot/setup-action@v1
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
if: github.repository == 'PostHog/posthog-foss'
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.repository == 'PostHog/posthog-foss'
@ -44,7 +45,7 @@ jobs:
- name: Build and push release
if: github.repository == 'PostHog/posthog-foss'
id: docker-release
uses: depot/build-push-action@v1
uses: docker/build-push-action@v2
with:
context: .
push: true

View File

@ -16,12 +16,7 @@ jobs:
name: Build & Deploy Production Docker image
if: github.repository == 'PostHog/posthog'
runs-on: ubuntu-20.04
permissions:
contents: read
id-token: write
steps:
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
@ -46,23 +41,14 @@ jobs:
# ref: 'master'
path: 'deploy/'
- name: Build image
uses: depot/build-push-action@v1
with:
context: .
file: prod.web.Dockerfile
load: true
tags: |
${{ steps.login-ecr.outputs.registry }}/posthog-production:${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/posthog-production:latest
- name: Push image to Amazon ECR
- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: posthog-production
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest -f prod.web.Dockerfile .
docker push --all-tags $ECR_REGISTRY/$ECR_REPOSITORY
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

View File

@ -13,9 +13,6 @@ jobs:
name: Build Docker images and push them
if: github.repository == 'PostHog/posthog'
runs-on: ubuntu-20.04
permissions:
contents: read
id-token: write
steps:
- name: Checkout default branch
uses: actions/checkout@v2
@ -23,10 +20,16 @@ jobs:
- name: Update git sha
run: echo "GIT_SHA = '${GITHUB_SHA}'" >posthog/gitsha.py
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Set up QEMU
if: github.repository == 'PostHog/posthog'
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
if: github.repository == 'PostHog/posthog'
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.repository == 'PostHog/posthog'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
@ -34,7 +37,8 @@ jobs:
- name: Build and push latest
id: docker-latest
uses: depot/build-push-action@v1
if: github.repository == 'PostHog/posthog'
uses: docker/build-push-action@v2
with:
context: .
push: true
@ -42,7 +46,8 @@ jobs:
- name: Build and push dev
id: docker-dev
uses: depot/build-push-action@v1
if: github.repository == 'PostHog/posthog'
uses: docker/build-push-action@v2
with:
context: .
file: dev.Dockerfile
@ -50,6 +55,7 @@ jobs:
tags: posthog/posthog:dev
- name: Image digests
if: github.repository == 'PostHog/posthog'
run: |
echo "Pushed latest: ${{ steps.docker-latest.outputs.digest }}"
echo "Pushed dev: ${{ steps.docker-dev.outputs.digest }}"

View File

@ -10,11 +10,7 @@ on:
jobs:
build-push:
name: Build & push Docker release image
if: github.repository == 'PostHog/posthog'
runs-on: ubuntu-20.04
permissions:
contents: read
id-token: write
steps:
- name: Checkout default branch
uses: actions/checkout@v2
@ -25,10 +21,16 @@ jobs:
- name: Update git SHA
run: echo "GIT_SHA = '${GITHUB_SHA}'" > posthog/gitsha.py
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Set up QEMU
if: github.repository == 'PostHog/posthog'
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
if: github.repository == 'PostHog/posthog'
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.repository == 'PostHog/posthog'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
@ -36,7 +38,8 @@ jobs:
- name: Build and push release
id: docker-release
uses: depot/build-push-action@v1
if: github.repository == 'PostHog/posthog'
uses: docker/build-push-action@v2
with:
context: .
push: true
@ -45,5 +48,6 @@ jobs:
posthog/posthog:release-${{ env.TAG_NAME }}
- name: Image digest
if: github.repository == 'PostHog/posthog'
run: |
echo "Pushed release: ${{ steps.docker-release.outputs.digest }}"

View File

@ -12,9 +12,6 @@ jobs:
name: Build & push Docker release image
if: github.repository == 'PostHog/posthog'
runs-on: ubuntu-20.04
permissions:
contents: read
id-token: write
steps:
- name: Checkout default branch
uses: actions/checkout@v2
@ -25,10 +22,16 @@ jobs:
- name: Update git SHA
run: echo "GIT_SHA = '${GITHUB_SHA}'" > posthog/gitsha.py
- name: Set up Depot CLI
uses: depot/setup-depot@v1
- name: Set up QEMU
if: github.repository == 'PostHog/posthog'
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
if: github.repository == 'PostHog/posthog'
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.repository == 'PostHog/posthog'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
@ -36,12 +39,14 @@ jobs:
- name: Build and push release
id: docker-release
uses: depot/build-push-action@v1
if: github.repository == 'PostHog/posthog'
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: posthog/posthog:${{ env.BRANCH_NAME }}-unstable
- name: Image digest
if: github.repository == 'PostHog/posthog'
run: |
echo "Pushed release: ${{ steps.docker-release.outputs.digest }}"

View File

@ -1 +0,0 @@
{ "id": "x19jffd9zf" }