From 4bd7a6bb9506382aa2af636d660ab651d8ecdd11 Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Wed, 6 Sep 2023 21:06:10 -0700 Subject: [PATCH] general: also release docker image to GitHub container registry --- .github/workflows/docker-develop.yaml | 11 +++++++++++ .github/workflows/docker-release.yaml | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/docker-develop.yaml b/.github/workflows/docker-develop.yaml index 5bae9ca..c2ae786 100644 --- a/.github/workflows/docker-develop.yaml +++ b/.github/workflows/docker-develop.yaml @@ -19,6 +19,13 @@ jobs: 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 frontend docker image uses: docker/build-push-action@v4 with: @@ -28,6 +35,8 @@ jobs: tags: | xddxdd/bird-lg-go:develop xddxdd/bird-lg-go:develop-${{ github.sha }} + ghcr.io/xddxdd/bird-lg-go:frontend-develop + ghcr.io/xddxdd/bird-lg-go:frontend-develop-${{ github.sha }} - name: Build proxy docker image uses: docker/build-push-action@v4 @@ -38,3 +47,5 @@ jobs: tags: | xddxdd/bird-lgproxy-go:develop xddxdd/bird-lgproxy-go:develop-${{ github.sha }} + ghcr.io/xddxdd/bird-lg-go:proxy-develop + ghcr.io/xddxdd/bird-lg-go:proxy-develop-${{ github.sha }} diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml index 84c67b9..2974e65 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -18,6 +18,13 @@ jobs: 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 frontend docker image uses: docker/build-push-action@v4 with: @@ -26,6 +33,7 @@ jobs: push: true tags: | xddxdd/bird-lg-go:latest + ghcr.io/xddxdd/bird-lg-go:frontend - name: Build proxy docker image uses: docker/build-push-action@v4 @@ -35,3 +43,4 @@ jobs: push: true tags: | xddxdd/bird-lgproxy-go:latest + ghcr.io/xddxdd/bird-lg-go:proxy