Merge pull request #546 from Candinya/feat/publish-to-ghcr
feat(ci): also publish docker image to ghcr
This commit is contained in:
@@ -59,6 +59,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
needs: test
|
needs: test
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -93,6 +96,13 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to GHCR
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push Multi-Arch Image
|
- name: Build and Push Multi-Arch Image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -102,6 +112,8 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
${{ env.REGISTRY_IMAGE }}:${{ env.VERSION }}
|
${{ env.REGISTRY_IMAGE }}:${{ env.VERSION }}
|
||||||
${{ env.REGISTRY_IMAGE }}:latest
|
${{ env.REGISTRY_IMAGE }}:latest
|
||||||
|
ghcr.io/${{ github.repository }}:${{ env.VERSION }}
|
||||||
|
ghcr.io/${{ github.repository }}:latest
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
# GitHub Actions env piped through so build.rs stamps
|
# GitHub Actions env piped through so build.rs stamps
|
||||||
|
|||||||
Reference in New Issue
Block a user