Skip to content

Commit

Permalink
(NOBIDS) ci: add way to publish docker images outside of releases
Browse files Browse the repository at this point in the history
  • Loading branch information
guybrush committed May 14, 2024
1 parent 0c265db commit f6d2d16
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish-docker-images-tagged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Docker images

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- publish-docker

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- id: pre-step
shell: bash
run: echo "release-version=$(TZ=UTC0 git show --quiet --date='format-local:%Y%m%d%H%M%S' --format="%cd" $GITHUB_SHA)-$(echo ${GITHUB_SHA:0:6})" >> $GITHUB_OUTPUT

- name: Publish to Dockerhub Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: gobitfly/eth2-beaconchain-explorer
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "${{ steps.pre-step.outputs.release-version }}"

0 comments on commit f6d2d16

Please sign in to comment.