From c077c41c99061cdfe5841920c1ddd3fb27149079 Mon Sep 17 00:00:00 2001 From: Kjuly Date: Wed, 8 May 2024 21:04:52 +0800 Subject: [PATCH] Add .github/workflows/* --- .../workflows/build-n-push-docker-image.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build-n-push-docker-image.yml diff --git a/.github/workflows/build-n-push-docker-image.yml b/.github/workflows/build-n-push-docker-image.yml new file mode 100644 index 0000000..3c1fc14 --- /dev/null +++ b/.github/workflows/build-n-push-docker-image.yml @@ -0,0 +1,36 @@ +name: Build and Push Docker Image + +on: + workflow_dispatch: + + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +env: + IMAGE_NAME: kjuly/ky-env-kjuly-com + +permissions: + contents: read + packages: write + id-token: write + attestations: write + +concurrency: + group: "images" + cancel-in-progress: false + +jobs: + build-n-push-image: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build and Push Image to Github Container Registry + uses: kjuly/docker-image-publisher@main + with: + registry: ghcr.io + image_name: ${{ env.IMAGE_NAME }} + username: ${{ github.actor }} + token: ${{ secrets.GITHUB_TOKEN }}