Skip to content

Commit

Permalink
Merge pull request #59 from qmk/ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc authored Mar 18, 2023
2 parents b2fe28f + 9927334 commit da308ce
Showing 1 changed file with 35 additions and 11 deletions.
46 changes: 35 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,48 @@
# This workflow will upload a Docker container

name: Upload Docker Container
name: Build/Upload Docker Container

on:
workflow_dispatch:
push:
branches:
- 'master'
pull_request:

jobs:
docker:
runs-on: ubuntu-latest

steps:
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and Push to Docker Hub
uses: docker/[email protected]
with:
push: true
tags: qmkfm/qmk_api:latest
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and Push to Registries
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/qmk/qmk_api:latest
qmkfm/qmk_api:latest

0 comments on commit da308ce

Please sign in to comment.