-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (51 loc) · 1.89 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (51 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Run release
on:
release:
types: [published]
jobs:
build-and-push-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the frontend Docker image
run: |
RELEASE=$(echo $GITHUB_REF | cut -d'/' -f 3)
docker build ./frontend --tag synbiohub/sbh3frontend:$RELEASE-release
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the frontend release image to Docker Hub
run: |
RELEASE=$(echo $GITHUB_REF | cut -d'/' -f 3)
docker push synbiohub/sbh3frontend:$RELEASE-release
- name: Build the backend Docker image
run: |
docker build ./backend --tag synbiohub/sbh3backend:$RELEASE-release
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the backend image to Docker Hub
run: |
docker push synbiohub/sbh3backend:$RELEASE-release
update-compose:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
repository: synbiohub/synbiohub3-docker
- name: Change tag
run: |
RELEASE=$(echo $GITHUB_REF | cut -d'/' -f 3)
sed -i "s/synbiohub\/sbh3backend:.*-release/synbiohub\/sbh3backend:$RELEASE-release/g" docker-compose.yml
sed -i "s/synbiohub\/sbh3frontend:.*-release/synbiohub\/sbh3frontend:$RELEASE-release/g" docker-compose.yml
- name: Commit tag change
uses: zwaldowski/git-commit-action@v1
- name: Push changes
uses: ad-m/github-push-action@master
with:
repository: synbiohub/synbiohub3-docker
github_token: ${{ secrets.BUGGSLEY_GITHUB_TOKEN }}