Skip to content

Commit

Permalink
Publish Docker images from the stable/unstable code.
Browse files Browse the repository at this point in the history
v-tagged push -> v-tagged stable image with stable tag also
master push -> dev tagged image
  • Loading branch information
sergystepanov committed May 26, 2021
1 parent eb10e20 commit 27e8a79
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions .github/workflows/docker_publish_unstable.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion .github/workflows/redeploy.sh

This file was deleted.

Empty file modified scripts/redeploy.sh
100644 → 100755
Empty file.

0 comments on commit 27e8a79

Please sign in to comment.