ipld-eth-db/.github/workflows/publish.yaml

50 lines
2.3 KiB
YAML
Raw Normal View History

name: Publish Docker image
on:
release:
types: [published, edited]
jobs:
build:
name: Run docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get the version
id: vars
2022-09-19 17:51:11 +00:00
run: |
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
- name: Run docker build
run: make docker-build
- name: Tag docker image
2022-09-19 14:56:45 +00:00
run: docker tag cerc-io/ipld-eth-db git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}}
2022-09-19 18:14:10 +00:00
- name: Tag docker image
2022-09-19 18:33:36 +00:00
run: docker tag git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}} git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.tag}}
- name: Docker Login
2022-09-19 14:56:45 +00:00
run: echo ${{ secrets.GITEA_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
- name: Docker Push
2022-09-19 14:56:45 +00:00
run: docker push git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}}
2022-09-19 17:51:11 +00:00
- name: Docker Push with TAG to git.vdb.to
run: docker push git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.tag}}
2022-09-19 14:56:45 +00:00
#push_to_registries:
# name: Push Docker image to Docker Hub
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Get the version
2022-09-19 17:51:11 +00:00
# id: vars
2022-09-19 14:56:45 +00:00
# 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 Github Registry
# run: echo ${{ secrets.GITEA_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
# - name: Docker Pull
# run: docker pull git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}}
2022-09-19 17:51:11 +00:00
# - name: Docker Push to Docker Hub
# run: docker push cerc-io/ipld-eth-db:${{steps.vars.outputs.tag}}
2022-09-19 14:56:45 +00:00
# - name: Docker Login to Docker Registry
# run: echo ${{ secrets.VULCANIZEJENKINS_PAT }} | docker login -u cerccicd --password-stdin
# - name: Tag docker image
# run: docker tag git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}} cerc-io/ipld-eth-db:${{steps.vars.outputs.tag}}
# - name: Docker Push to Docker Hub
# run: docker push cerc-io/ipld-eth-db:${{steps.vars.outputs.tag}}