2021-09-30 12:39:48 +00:00
|
|
|
name: Publish Docker image
|
|
|
|
on:
|
|
|
|
release:
|
2022-05-13 12:03:26 +00:00
|
|
|
types: [published, edited]
|
2021-09-30 12:39:48 +00:00
|
|
|
jobs:
|
2022-05-12 15:18:08 +00:00
|
|
|
build:
|
2023-05-19 10:04:21 +00:00
|
|
|
name: Build and publish image
|
2022-05-12 15:18:08 +00:00
|
|
|
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: |
|
2023-08-31 16:55:10 +00:00
|
|
|
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}}
|