Skip to content

Commit

Permalink
Fix the deploy stage of our build pipeline
Browse files Browse the repository at this point in the history
I've fixed the deploy stage of our build pipeline, as it got mixed in
with the old workflow file due to a merge conflict. The deploy stage is
currently split into a separate workflow; theoretically, this allows us
to trigger a redeploy from GitHub, without having to build the container
image again.

Signed-off-by: Sebastiaan Zeeff <[email protected]>
  • Loading branch information
SebastiaanZ committed Nov 19, 2020
1 parent 506909e commit d65785a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 172 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy

on:
workflow_run:
workflows: ["Build"]
branches:
- master
types:
- completed

jobs:
build:
if: github.event.workflow_run.conclusion == 'success'
name: Build & Push
runs-on: ubuntu-latest

steps:
- name: Authenticate with Kubernetes
uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBECONFIG }}

- name: Deploy to Kubernetes
uses: Azure/k8s-deploy@v1
with:
manifests: |
deployment.yaml
images: 'ghcr.io/python-discord/bot:${{ steps.sha_tag.outputs.tag }}'
kubectl-version: 'latest'
171 changes: 0 additions & 171 deletions .github/workflows/lint-test-deploy.yml

This file was deleted.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Python Utility Bot

[![Discord](https://img.shields.io/static/v1?label=Python%20Discord&logo=discord&message=%3E100k%20members&color=%237289DA&logoColor=white)](https://discord.gg/2B963hn)
[![Discord][7]][8]
[![Lint & Test][1]][2]
[![Build][3]][4]
[![Deploy][5]][6]
[![Coverage Status](https://coveralls.io/repos/github/python-discord/bot/badge.svg)](https://coveralls.io/github/python-discord/bot)
[![License](https://img.shields.io/github/license/python-discord/bot)](LICENSE)
[![Website](https://img.shields.io/badge/website-visit-brightgreen)](https://pythondiscord.com)
Expand All @@ -16,3 +17,7 @@ Read the [Contributing Guide](https://pythondiscord.com/pages/contributing/bot/)
[2]: https://github.com/python-discord/bot/actions?query=workflow%3A%22Lint+%26+Test%22+branch%3Amaster
[3]: https://github.com/python-discord/bot/workflows/Build/badge.svg?branch=master
[4]: https://github.com/python-discord/bot/actions?query=workflow%3ABuild+branch%3Amaster
[5]: https://github.com/python-discord/bot/workflows/Deploy/badge.svg?branch=master
[6]: https://github.com/python-discord/bot/actions?query=workflow%3ADeploy+branch%3Amaster
[7]: https://img.shields.io/static/v1?label=Python%20Discord&logo=discord&message=%3E100k%20members&color=%237289DA&logoColor=white
[8]: https://discord.gg/2B963hn

0 comments on commit d65785a

Please sign in to comment.