create packages in ghcr.io

This commit is contained in:
Alex Shnitman 2023-03-25 10:46:09 +03:00
parent 50805b88b6
commit 14cf684aa0

View file

@ -15,19 +15,26 @@ jobs:
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
@ -38,6 +45,8 @@ jobs:
tags: |
${{ secrets.DOCKERHUB_REPOSITORY }}:latest
${{ secrets.DOCKERHUB_REPOSITORY }}:${{ steps.date.outputs.date }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.date.outputs.date }}
dockerhub-sync-readme:
needs: dockerhub-build-push