eth-statediff-service/.github/workflows/manual_publish.yml
2022-09-28 17:47:42 -04:00

34 lines
1.6 KiB
YAML

name: MANUAL Override Publish from release SHA to TAG
on:
workflow_dispatch:
inputs:
giteaPublishTag:
description: 'Release TAG to publish TO on gitea; e.g. v4.1.5-alpha'
required: true
cercContainerTag:
description: 'Container (truncated!!! SHA) to release-tag FROM'
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: Pull SHA and add release-tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get the version
id: vars
run: |
echo ::set-output name=sha::$(echo ${cercContainerTag:0:7})
- name: Pull docker image by SHA
run: docker pull git.vdb.to/cerc-io/eth-statediff-service/eth-statediff-service:${{github.event.inputs.cercContainerTag}}
- name: Tag docker image TAG
run: docker tag git.vdb.to/cerc-io/eth-statediff-service/eth-statediff-service:${{github.event.inputs.cercContainerTag}} git.vdb.to/cerc-io/eth-statediff-service/eth-statediff-service:${{github.event.inputs.giteaPublishTag}}
- name: Docker Login
run: echo ${{ secrets.GITEA_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
- name: Docker Push Release Tag
run: docker push git.vdb.to/cerc-io/eth-statediff-service/eth-statediff-service:${{github.event.inputs.giteaPublishTag}}
- name: Docker Push LATEST Tag
run: docker push git.vdb.to/cerc-io/eth-statediff-service/eth-statediff-service:latest