From 24bcf69b83b3d1fe6d801ec4196b8b0e4e012e95 Mon Sep 17 00:00:00 2001 From: WAAutoMaton Date: Sat, 4 May 2024 13:35:13 +0800 Subject: [PATCH] Update github action --- .github/workflows/docker-image.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3f51b2e..1eb93fd 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,17 +1,24 @@ name: Docker Image CI on: push: - branches: [ "master" ] + branches: [ "**" ] jobs: build: runs-on: ubuntu-22.04 + permissions: + packages: write + contents: read env: - tag: ${{ secrets.CI_REGISTRY }}/geekpie/coursebench-backend:latest + REGISTRY: ghcr.io + USERNAME: ShanghaitechGeekPie + IMAGE_NAME : ${{ github.repository }} steps: - - uses: actions/checkout@v3 - - name: Login to Docker Hub - uses: docker/login-action@v2 + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Login to Container registry + uses: docker/login-action@v1 with: registry: ${{ env.REGISTRY }} username: ${{ env.USERNAME }}