Skip to content

only push docker image for main branch #21

only push docker image for main branch

only push docker image for main branch #21

Workflow file for this run

name: ci
on: [push]
jobs:
docker:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: cwithmichael/whatcanueat:latest