.github/workflows/build_push.yml #1118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . | |