aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yaml16
-rw-r--r--deployment.yaml21
2 files changed, 13 insertions, 24 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index abc257f3..b83e15fc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -22,8 +22,18 @@ jobs:
tag=$(cut -c 1-7 <<< $GITHUB_SHA)
echo "::set-output name=tag::$tag"
+ # Check out the current repository in the `sir-lancebot` subdirectory
- name: Checkout code
uses: actions/checkout@v2
+ path: sir-lancebot
+
+ # Check out the private "kubernetes" repository in the `kubernetes`
+ # subdirectory using a GitHub Personal Access Token
+ - name: Checkout code
+ uses: actions/checkout@v2
+ repository: python-discord/kubernetes
+ token: ${{ secrets.REPO_TOKEN }}
+ path: kubernetes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
@@ -41,8 +51,8 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v2
with:
- context: .
- file: ./Dockerfile
+ context: sir-lancebot/
+ file: sir-lancebot/Dockerfile
push: true
cache-from: type=registry,ref=ghcr.io/python-discord/sir-lancebot:latest
cache-to: type=inline
@@ -60,6 +70,6 @@ jobs:
uses: Azure/k8s-deploy@v1
with:
manifests: |
- deployment.yaml
+ kubernetes/sir-lancebot/deployment.yaml
images: 'ghcr.io/python-discord/sir-lancebot:${{ steps.sha_tag.outputs.tag }}'
kubectl-version: 'latest'
diff --git a/deployment.yaml b/deployment.yaml
deleted file mode 100644
index cad97c18..00000000
--- a/deployment.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: sir-lancebot
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: sir-lancebot
- template:
- metadata:
- labels:
- app: sir-lancebot
- spec:
- containers:
- - name: sir-lancebot
- image: ghcr.io/python-discord/sir-lancebot:latest
- imagePullPolicy: Always
- envFrom:
- - secretRef:
- name: sir-lancebot-env