mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-22 02:59:06 +00:00
create and tag docker image to git.vdb.to on publish
This commit is contained in:
parent
306bbb73ca
commit
e1f96c186b
22
.github/workflows/publish.yaml
vendored
22
.github/workflows/publish.yaml
vendored
@ -4,22 +4,28 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
jobs:
|
jobs:
|
||||||
docker_publish:
|
docker_publish:
|
||||||
name: Push Docker image to Github Hub
|
name: Run docker build and publish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Run docker build
|
||||||
|
run: docker build -t cerc-io/watcher-ts -f Dockerfile .
|
||||||
- name: Get the version
|
- name: Get the version
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
|
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
|
||||||
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
|
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 cerc-io --password-stdin
|
|
||||||
- name: Docker Pull
|
|
||||||
run: docker pull ghcr.io/cerc-io/watcher-ts:${{steps.vars.outputs.sha}}
|
|
||||||
- name: Tag docker image
|
- name: Tag docker image
|
||||||
run: docker tag ghcr.io/cerc-io/watcher-ts:${{steps.vars.outputs.sha}} ghcr.io/cerc-io/watcher-ts:${{steps.vars.outputs.tag}}
|
run: docker tag cerc-io/watcher-ts git.vdb.to/cerc-io/watcher-ts/watcher-ts:${{steps.vars.outputs.sha}}
|
||||||
- name: Docker Push to Github Hub
|
- name: Tag docker image
|
||||||
run: docker push ghcr.io/cerc-io/watcher-ts:${{steps.vars.outputs.tag}}
|
run: docker tag git.vdb.to/cerc-io/watcher-ts/watcher-ts:${{steps.vars.outputs.sha}} git.vdb.to/cerc-io/watcher-ts/watcher-ts:${{steps.vars.outputs.tag}}
|
||||||
|
- name: Docker Login
|
||||||
|
run: echo ${{ secrets.GITEA_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
|
||||||
|
- name: Docker Push
|
||||||
|
run: docker push git.vdb.to/cerc-io/watcher-ts/watcher-ts:${{steps.vars.outputs.sha}}
|
||||||
|
- name: Docker Push TAGGED
|
||||||
|
run: docker push git.vdb.to/cerc-io/watcher-ts/watcher-ts:${{steps.vars.outputs.tag}}
|
||||||
|
|
||||||
|
|
||||||
npm_publish:
|
npm_publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
Loading…
Reference in New Issue
Block a user