-
Notifications
You must be signed in to change notification settings - Fork 14
64 lines (53 loc) · 2.12 KB
/
warehouse-publish-docker-containers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: warehouse-publish-docker-containers
env:
X_GITHUB_GRAPHQL_API: ${{ vars.X_GITHUB_GRAPHQL_API }}
X_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This workflow only runs when a commit is completed on main.
on:
# Allows you to run this workflow manually from the Actions tab
push:
branches:
- main
jobs:
warehouse-publish-docker-containers:
name: warehouse-publish-docker-containers
environment: indexer
runs-on: ubuntu-latest
permissions:
packages: write
contents: 'read'
id-token: 'write'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Package and publish cloudquery plugins
run: bash .github/scripts/publish-cloudquery-plugins.sh
- name: Package and publish other docker containers
run: bash .github/scripts/publish-docker-containers.sh
# The remaining steps currently kill a pods in our kubernetes
# because we haven't dealt with using strict versions on the cluster yet.
# This ensures the pods are up to date. This is a hack for now.
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS_JSON }}'
create_credentials_file: true
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@db150f2cc60d1716e61922b832eae71d2a45938f
with:
cluster_name: ${{ secrets.GKE_CLUSTER_NAME }}
location: ${{ secrets.GKE_CLUSTER_REGION }}
project_id: ${{ vars.GOOGLE_PROJECT_ID }}
- name: Delete pod for dagster
run: kubectl delete pods --namespace production-dagster -l app.kubernetes.io/instance=production-dagster,component=user-deployments