clean msg_id #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Email Parser Docker | |
on: | |
push: | |
# Publish `main` as Docker `latest` image. | |
branches: | |
- master | |
# Publish `v1.2.3` tags as releases. | |
tags: | |
- v* | |
# Run tests for any PRs. | |
pull_request: | |
jobs: | |
# Push image to Docker Hub. | |
push-email-parser-to-docker: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare | |
id: prep | |
run: | | |
VERSION=edge | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
VERSION=${GITHUB_REF#refs/tags/} | |
else VERSION=latest | |
fi | |
echo ::set-output name=version::${VERSION} | |
- | |
name: Set up 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_TOKEN }} | |
- | |
name: Build and push email parser image | |
id: docker_build_parser | |
uses: docker/build-push-action@v2 | |
with: | |
file: email-parser/Dockerfile | |
push: true | |
tags: smclab/openk9-email-parser:${{ steps.prep.outputs.version }} |