opentrashmail/.github/workflows/build-docker.yml

33 lines
1,005 B
YAML
Raw Normal View History

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
2021-11-10 08:16:48 +00:00
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
2021-11-10 08:16:48 +00:00
run: docker push hascheksolutions/opentrashmail:${{ steps.date.outputs.date }}