Skip to content

Bump version to 0.2.4 #5

Bump version to 0.2.4

Bump version to 0.2.4 #5

Workflow file for this run

name: Publish Release Docker Image
on:
push:
tags:
- 'v*'
jobs:
release:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Prepare docker image metadata
id: prep
run: |
function join { local IFS="$1"; shift; echo "$*"; }
DOCKER_IMAGE=seijikun/idlemail
VERSIONS=( ${GITHUB_REF#refs/tags/} latest)
TAGS=( "${VERSIONS[@]/#/${DOCKER_IMAGE}:}" )
VERSIONS=$(join , ${VERSIONS[@]})
TAGS=$(join , ${TAGS[@]})
echo ::set-output name=version::${VERSIONS}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.prep.outputs.tags }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}