Skip to content

.github/workflows/build_push.yml #791

.github/workflows/build_push.yml

.github/workflows/build_push.yml #791

Workflow file for this run

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
schedule:
- cron: "0 1 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
buildx-version: latest
- name: login to docker hub
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
- name: build and push image
run: |
echo ${{ github.ref }}
docker buildx build --push \
--tag maihai/invoiceninja_v5:${{ github.ref == 'refs/heads/main' && 'latest' || 'test' }} \
--platform linux/amd64 .