Skip to content

Docker Build and Push #13

Docker Build and Push

Docker Build and Push #13

Workflow file for this run

name: Docker Build and Push
on:
push:
branches:
- main
paths-ignore:
- README.md
- .gitignore
- .github/**
workflow_dispatch:
jobs:
container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Build
shell: bash
run: |
docker buildx build . \
--platform=linux/arm64,linux/amd64 \
-t ghcr.io/${GITHUB_REPOSITORY,,}:$(date +%Y%m%d.$GITHUB_RUN_NUMBER)
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Publish
shell: bash
run: |
docker push ghcr.io/${GITHUB_REPOSITORY,,}:$(date +%Y%m%d.$GITHUB_RUN_NUMBER)