Skip to content

Commit 401a920

Browse files
author
Sam Morris
committed
update a release workflow
1 parent e4aed9f commit 401a920

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

.github/workflows/main-branch.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
name: Main branch workflow
22

33
on:
4-
push:
5-
branches: [main]
4+
release:
5+
types: [published]
6+
7+
env:
8+
IMAGE_NAME: samanthamorris684/catbot
69

710
jobs:
811
build-and-push-main:
912
uses: ./.github/workflows/build-and-push.yml
1013
with:
11-
IMAGE_TAG: main@$GITHUB_SHA
14+
IMAGE_TAG: $GITHUB_SHA
1215
secrets:
1316
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
14-
17+
update-cluster:
18+
name: Update with new image
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Deploy new docker image to cluster
22+
uses: tuongaz/[email protected]
23+
env:
24+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
25+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26+
AWS_REGION: ${{ secrets.AWS_REGION }}
27+
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA_BASE_64_ENCODED }}
28+
with:
29+
args: set image deployment/server-deployment container-name=$IMAGE_NAME:$GITHUB_SHA

.github/workflows/release.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)