aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yaml34
1 files changed, 24 insertions, 10 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 08721dfd..0a006eb9 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -11,7 +11,7 @@ on:
jobs:
build:
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push'
- name: Build, Push, & Deploy Container
+ name: Build & Push
runs-on: ubuntu-latest
steps:
@@ -28,15 +28,6 @@ jobs:
with:
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
- with:
- repository: python-discord/kubernetes
- token: ${{ secrets.REPO_TOKEN }}
- path: kubernetes
-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
@@ -64,6 +55,29 @@ jobs:
build-args: |
git_sha=${{ github.sha }}
+ deploy:
+ needs: build
+ name: Deploy
+ runs-on: ubuntu-latest
+ environment: production
+
+ steps:
+ # Create a commit SHA-based tag for the container repositories
+ - name: Create SHA Container Tag
+ id: sha_tag
+ run: |
+ tag=$(cut -c 1-7 <<< $GITHUB_SHA)
+ echo "::set-output name=tag::$tag"
+
+ # Check out the private "kubernetes" repository in the `kubernetes`
+ # subdirectory using a GitHub Personal Access Token
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ repository: python-discord/kubernetes
+ token: ${{ secrets.REPO_TOKEN }}
+ path: kubernetes
+
- name: Authenticate with Kubernetes
uses: azure/k8s-set-context@v1
with: