Browse Source

Move Docker images to GitHub Container Registry

DarthSim 6 months ago
parent
commit
5b8c8f2516
6 changed files with 30 additions and 4 deletions
  1. 21 0
      .github/workflows/build.yml
  2. 3 0
      .github/workflows/on-push.yml
  3. 3 0
      .github/workflows/release.yml
  4. 1 2
      README.md
  5. 1 1
      app.json
  6. 1 1
      heroku/Dockerfile

+ 21 - 0
.github/workflows/build.yml

@@ -6,6 +6,7 @@ on:
 env:
   DOCKER_META_IMAGES: |
     darthsim/imgproxy
+    ghcr.io/imgproxy/imgproxy
   DOCKER_META_TAGS: |
     type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
     type=ref,event=branch,enable=${{ startsWith(github.ref, 'refs/heads/test/') }}
@@ -27,6 +28,9 @@ jobs:
     runs-on:
       - codebuild-imgproxy-${{ github.run_id }}-${{ github.run_attempt }}
       - image:${{ matrix.build.image }}
+    permissions:
+      contents: read
+      packages: write
     steps:
       - name: Checkout
         uses: actions/checkout@v4
@@ -47,6 +51,13 @@ jobs:
           username: ${{ vars.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
 
+      - name: Login to GitHub Container Registry
+        uses: docker/login-action@v3
+        with:
+          registry: ghcr.io
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
+
       - name: Set up Docker Buildx
         uses: docker/setup-buildx-action@v3
 
@@ -64,6 +75,9 @@ jobs:
   push_manifests:
     needs: build
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
     steps:
       - name: Docker meta
         id: meta
@@ -80,6 +94,13 @@ jobs:
           username: ${{ vars.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
 
+      - name: Login to GitHub Container Registry
+        uses: docker/login-action@v3
+        with:
+          registry: ghcr.io
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
+
       - name: Push manifests
         run: |
           for tag in ${{ join(fromJSON(steps.meta.outputs.json).tags, ' ') }}

+ 3 - 0
.github/workflows/on-push.yml

@@ -13,5 +13,8 @@ jobs:
     if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/test/'))
     needs: [ci]
     uses: ./.github/workflows/build.yml
+    permissions:
+      contents: read
+      packages: write
     secrets: inherit
 

+ 3 - 0
.github/workflows/release.yml

@@ -13,6 +13,9 @@ jobs:
   build:
     needs: [ci]
     uses: ./.github/workflows/build.yml
+    permissions:
+      contents: read
+      packages: write
     secrets: inherit
 
   release:

+ 1 - 2
README.md

@@ -13,14 +13,13 @@
   <a href="https://imgproxy.net/blog/">Blog</a> |
   <a href="https://docs.imgproxy.net">Documentation</a> |
   <a href="https://imgproxy.net/#pro">imgproxy Pro</a> |
-  <a href="https://hub.docker.com/r/darthsim/imgproxy/">Docker</a> |
+  <a href="https://github.com/imgproxy/imgproxy/pkgs/container/imgproxy">Docker</a> |
   <a href="https://twitter.com/imgproxy_net">Twitter</a> |
   <a href="https://discord.gg/5GgpXgtC9u">Discord</a>
 </h4>
 
 <p align="center">
 <a href="https://github.com/imgproxy/imgproxy/actions"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/imgproxy/imgproxy/on-push.yml?branch=master&label=CI&style=for-the-badge" /></a>
-<a href="https://hub.docker.com/r/darthsim/imgproxy/"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/darthsim/imgproxy.svg?logo=docker&logoColor=white&style=for-the-badge" /></a>
 </p>
 
 ---

+ 1 - 1
app.json

@@ -3,7 +3,7 @@
   "description": "Fast and secure standalone server for resizing and converting remote images.",
   "keywords": ["image", "resize-images", "crop-image", "microservice", "docker", "jpeg", "png", "libvips"],
   "repository": "https://github.com/imgproxy/imgproxy",
-  "logo": "https://cdn.rawgit.com/DarthSim/imgproxy/master/logo.svg",
+  "logo": "https://cdn.rawgit.com/imgproxy/imgproxy/master/logo.svg",
   "success_url": "/health",
   "stack": "container",
   "env": {

+ 1 - 1
heroku/Dockerfile

@@ -1,4 +1,4 @@
 ARG IMGPROXY_TAG=latest
 
-FROM darthsim/imgproxy:$IMGPROXY_TAG
+FROM ghcr.io/imgproxy/imgproxy:$IMGPROXY_TAG
 LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"