opentrashmail/.github/workflows/build-docker.yml
Christian Haschek a432d5e691 fixed tag names
2021-11-10 09:16:48 +01:00

33 lines
1,005 B
YAML

name: opentrashmail ci
# use either
# ${{steps.date.outputs.date}} for date tag
# or ${{ github.event.release.tag_name }} for github release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +%s)"
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file docker/Dockerfile --tag hascheksolutions/opentrashmail:${{ steps.date.outputs.date }} --tag hascheksolutions/opentrashmail:latest
-
name: Login to registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Pushing push as latest
run: docker push hascheksolutions/opentrashmail:latest
- name: Pushing to private registry
run: docker push hascheksolutions/opentrashmail:${{ steps.date.outputs.date }}