Skip to content

Commit 874c1dc

Browse files
authored
Merge pull request #1 from TaskarCenterAtUW/main
DevOps workflow improvements
2 parents 8ffbce4 + 77d9424 commit 874c1dc

File tree

4 files changed

+19
-381
lines changed

4 files changed

+19
-381
lines changed

.github/build-v2-wip.yaml

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

.github/workflows/build.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: "Release"
22
on:
3+
push:
4+
branches:
5+
- dev
6+
- stage
7+
38
workflow_dispatch:
49
inputs:
510
build_flag:
@@ -13,9 +18,9 @@ on:
1318
jobs:
1419
build:
1520
runs-on: ubuntu-latest
16-
name: Build, Push, Deploy (dev)
17-
environment: "dev"
18-
timeout-minutes: 45
21+
name: Build, Push, Deploy
22+
environment: ${{ github.ref_name }}
23+
timeout-minutes: 20
1924
steps:
2025
- uses: actions/checkout@v2
2126
with:
@@ -31,9 +36,9 @@ jobs:
3136
id: build_changelog
3237
uses: mikepenz/release-changelog-builder-action@v5
3338
with:
34-
fromTag: "0.1"
3539
toTag: ${{ github.sha }}
3640
mode: "HYBRID"
41+
outputFile: "CHANGELOG.md"
3742

3843
- name: Set up Docker Buildx
3944
uses: docker/setup-buildx-action@v3
@@ -56,6 +61,9 @@ jobs:
5661
WS_TASKS_DB_PASS: ${{ secrets.WS_TASKS_DB_PASS }}
5762
WS_TASKS_SECRET_KEY: ${{ secrets.WS_TASKS_SECRET_KEY }}
5863

64+
- name: Print CHANGELOG.md
65+
run: cat CHANGELOG.md
66+
5967
- name: Deploy
6068
env:
6169
ENV: ${{ vars.ENV }}
@@ -88,8 +96,8 @@ jobs:
8896
ssh-add ~/.ssh/github_actions
8997
9098
echo Configuring docker context
91-
docker context create dev --docker "host=ssh://github-actions@${{ vars.AZURE_DOCKER_HOST_IP }}"
92-
docker context use dev
99+
docker context create ${{ vars.ENV }} --docker "host=ssh://github-actions@${{ vars.AZURE_DOCKER_HOST_IP }}"
100+
docker context use ${{ vars.ENV }}
93101
94102
# remove images no longer in use--may need disk space to pull
95103
echo Pruning old docker images

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
```docker-compose -f docker-compose.build.yml --env-file XXX.env build```
2525

26-
```docker-compose --env-file XXX.env push```
26+
```docker-compose -f docker-compose.build.yml push```
2727

2828
Replace XXX.env with the environment definition file of the environment for which you want to build an image. This can be overridden when running (see below).
2929

@@ -37,3 +37,7 @@ Replace XXX.env with the environment definition file of the environment for whic
3737

3838
* ```example.env```: template of the .env file required by the Docker compose YAML files
3939
* ```tdei_uw.env```: .env for deployment at UW's TDEI center. Only UW should use this, new users should adapt example.env to suit their needs. LTG: remove this file from this repo.
40+
41+
# GH Actions
42+
43+
See GitHub's actions tab in this repo for more deployment examples/steps.

0 commit comments

Comments
 (0)