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

27 lines
1013 B
YAML
Raw Normal View History

name: Publish Docker image
on:
release:
types: [published, edited]
jobs:
build:
2023-05-19 10:04:21 +00:00
name: Build and publish image
runs-on: ubuntu-latest
steps:
2023-05-14 16:32:50 +00:00
- uses: actions/checkout@v3
2023-05-19 10:04:21 +00:00
- id: vars
name: Output SHA and version tag
2023-03-21 17:49:12 +00:00
run: |
echo "sha=${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
2023-05-19 10:04:21 +00:00
- name: Build and tag image
run: |
docker build . \
-t cerc-io/ipld-eth-db \
-t git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}} \
-t git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.tag}}
- name: Push image tags
run: |
echo ${{ secrets.GITEA_PUBLISH_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
docker push git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}}
docker push git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.tag}}