added automated build since docker hub wants money if they do it on their side ;D
This commit is contained in:
parent
a36f4f2659
commit
116d89c6c0
34
.github/workflows/build-docker.yml
vendored
Normal file
34
.github/workflows/build-docker.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
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:${{ github.event.release.tag_name }} --tag hascheksolutions/opentrashmail:latest
|
||||
-
|
||||
name: Login to registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: registry.haschek.at
|
||||
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:${{ github.event.release.tag_name }}
|
Loading…
Reference in a new issue