Publish Docker images from the stable/unstable code.

v-tagged push -> v-tagged stable image with stable tag also
master push -> dev tagged image
This commit is contained in:
Sergey Stepanov 2021-05-26 22:23:47 +03:00
parent eb10e203c9
commit 27e8a792fd
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B
4 changed files with 33 additions and 9 deletions

View file

@ -1,32 +1,31 @@
# ------------------------------------------------------------------------
# Publish Docker image from the current snapshot into Github repository
# Publish Docker image from the stable snapshot into Github repository
# ------------------------------------------------------------------------
name: publish
name: publish-stable
on:
push:
branches:
- master
tags:
- 'v*'
jobs:
docker-publish:
docker-publish-stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- uses: docker/build-push-action@v1
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
add_git_labels: true
tag_with_ref: true
tags: latest
tags: latest,${{ env.TAG }}
registry: docker.pkg.github.com
repository: ${{ github.REPOSITORY }}/cloud-game
- name: Redeploy
run: ./scripts/redeploy.sh
run: ./scripts/redeploy.sh

View file

@ -0,0 +1,26 @@
# ----------------------------------------------------------------------------
# Publish Docker image from the current master branch into Github repository
# ----------------------------------------------------------------------------
name: publish-unstable
on:
push:
branches:
- master
jobs:
docker-publish-unstable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v1
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
add_git_labels: true
tags: dev
registry: docker.pkg.github.com
repository: ${{ github.REPOSITORY }}/cloud-game

View file

@ -1 +0,0 @@
echo "test"

0
scripts/redeploy.sh vendored Normal file → Executable file
View file