diff options
-rw-r--r-- | .github/workflows/main.yml | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f7af43..0d2d59d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,20 +15,27 @@ 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 with: @@ -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 |