Skip to content

Update build-and-push.yml #4

Update build-and-push.yml

Update build-and-push.yml #4

name: Build and Push Container
on:
push:
branches:
- main # Change this to your default branch if it's different
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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 container
run: |
docker build . -t quay.io/jbaldus/path_to_adventure:latest
docker login -u ${{ secrets.QUAY_USERNAME }} -p ${{ secrets.QUAY_PASSWORD }} quay.io
docker push quay.io/jbaldus/path_to_adventure:latest
env:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}