mirror of
https://github.com/cerc-io/watcher-ts
synced 2024-11-19 12:26:19 +00:00
24 lines
904 B
YAML
24 lines
904 B
YAML
|
name: Publish Docker image
|
||
|
on:
|
||
|
release:
|
||
|
types: [published]
|
||
|
jobs:
|
||
|
docker_publish:
|
||
|
name: Push Docker image to Github Hub
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Get the version
|
||
|
id: vars
|
||
|
run: |
|
||
|
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
|
||
|
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
|
||
|
- name: Docker Login to Registry
|
||
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u vulcanize --password-stdin
|
||
|
- name: Docker Pull
|
||
|
run: docker pull ghcr.io/vulcanize/watcher-ts:${{steps.vars.outputs.sha}}
|
||
|
- name: Tag docker image
|
||
|
run: docker tag ghcr.io/vulcanize/watcher-ts:${{steps.vars.outputs.sha}} ghcr.io/vulcanize/watcher-ts:${{steps.vars.outputs.tag}}
|
||
|
- name: Docker Push to Github Hub
|
||
|
run: docker push ghcr.io/vulcanize/watcher-ts:${{steps.vars.outputs.tag}}
|
||
|
|