Skip to content

Commit

Permalink
Public docker images to GHCR instead of Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
icgood committed Mar 19, 2023
1 parent ac399fa commit e5032ce
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/docker-build.yml
Expand Up @@ -12,30 +12,27 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v3
- name: Docker meta
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
icgood/pymap
ghcr.io/${{ github.repository }}
tags: |
type=edge,branch=main
type=pep440,pattern={{major}}
type=pep440,pattern={{major}}.{{minor}}
type=pep440,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
Expand Down

0 comments on commit e5032ce

Please sign in to comment.