From f2ce27ccb278f48a9faa0a2eaf1bd1d1f90aacb4 Mon Sep 17 00:00:00 2001 From: Yuzerion Date: Sat, 30 Mar 2024 00:25:33 +0800 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0f88ae6..8d32095 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,18 +1,12 @@ -name: Docker Image CI +name: Build and Push Container to GitHub Container Registry on: - push: - branches: [ "main" ] pull_request: - branches: [ "main" ] + types: [opened, synchronize, reopened] jobs: - - build: - + build_and_push: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag go-proxy:$(date +%s) --tag go-proxy:0.4 --tag go-proxy:latest + - name: Build and Push Container to ghcr.io + uses: GlueOps/github-actions-build-push-containers@v0.3.7