Skip to content

Commit 27e8a79

Browse files
committed
Publish Docker images from the stable/unstable code.
v-tagged push -> v-tagged stable image with stable tag also master push -> dev tagged image
1 parent eb10e20 commit 27e8a79

4 files changed

Lines changed: 33 additions & 9 deletions

File tree

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
# ------------------------------------------------------------------------
2-
# Publish Docker image from the current snapshot into Github repository
2+
# Publish Docker image from the stable snapshot into Github repository
33
# ------------------------------------------------------------------------
44

5-
name: publish
5+
name: publish-stable
66

77
on:
88
push:
9-
branches:
10-
- master
119
tags:
1210
- 'v*'
1311

1412
jobs:
15-
docker-publish:
13+
docker-publish-stable:
1614
runs-on: ubuntu-latest
1715
steps:
1816
- uses: actions/checkout@v2
1917

18+
- run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
19+
2020
- uses: docker/build-push-action@v1
2121
with:
2222
username: ${{ github.repository_owner }}
2323
password: ${{ secrets.GITHUB_TOKEN }}
2424
add_git_labels: true
25-
tag_with_ref: true
26-
tags: latest
25+
tags: latest,${{ env.TAG }}
2726

2827
registry: docker.pkg.github.com
2928
repository: ${{ github.REPOSITORY }}/cloud-game
3029

3130
- name: Redeploy
32-
run: ./scripts/redeploy.sh
31+
run: ./scripts/redeploy.sh
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# ----------------------------------------------------------------------------
2+
# Publish Docker image from the current master branch into Github repository
3+
# ----------------------------------------------------------------------------
4+
5+
name: publish-unstable
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
docker-publish-unstable:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- uses: docker/build-push-action@v1
19+
with:
20+
username: ${{ github.repository_owner }}
21+
password: ${{ secrets.GITHUB_TOKEN }}
22+
add_git_labels: true
23+
tags: dev
24+
25+
registry: docker.pkg.github.com
26+
repository: ${{ github.REPOSITORY }}/cloud-game

.github/workflows/redeploy.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/redeploy.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)