Skip to content

Merge pull request #94 from ajcwebdev/staging #8

Merge pull request #94 from ajcwebdev/staging

Merge pull request #94 from ajcwebdev/staging #8

Workflow file for this run

name: CI - Build and Push Docker Images
on:
push:
branches: [ "main" ]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU (for cross-platform builds, optional)
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push to Docker Hub
uses: docker/build-push-action@v3
with:
context: .
file: .github/Dockerfile
push: true
tags: |
ajcwebdev/autoshow:latest
ajcwebdev/autoshow:${{ github.sha }}
- name: Build and push to GHCR
uses: docker/build-push-action@v3
with:
context: .
file: .github/Dockerfile
push: true
tags: |
ghcr.io/ajcwebdev/autoshow:latest
ghcr.io/ajcwebdev/autoshow:${{ github.sha }}