mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-17 03:44:04 +01:00
36 lines
993 B
YAML
36 lines
993 B
YAML
name: Build images and push to Docker registry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Login to DockerHub
|
|
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
|
|
|
- name: Get the latest tag
|
|
id: vars
|
|
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
|
|
|
|
- name: Build image from alpine
|
|
run: make build-alpine TAG="${{steps.vars.outputs.tag}}"
|
|
|
|
- name: Push alpine-based image
|
|
run: make push-alpine TAG="${{steps.vars.outputs.tag}}"
|
|
|
|
- name: Build image from debian
|
|
run: make build-debian TAG="${{steps.vars.outputs.tag}}"
|
|
|
|
- name: Push debian-based image
|
|
run: make push-debian TAG="${{steps.vars.outputs.tag}}"
|
|
|
|
- name: Logout from DockerHub
|
|
run: docker logout |