From baa19d9dc9bec98e7326ef544d6d9dc0cec81fea Mon Sep 17 00:00:00 2001 From: AgustinSRG Date: Sat, 16 Sep 2023 11:13:03 +0200 Subject: [PATCH] Docker: Add auto push for GitHub packages --- .github/workflows/docker-image.yml | 19 +++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 981289e..58ccf93 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -30,3 +30,22 @@ jobs: - name: Push the Docker image (Latest) run: docker push asanrom/showdown-chatbot:latest + - name: Docker Login (GitHub Packages) + uses: docker/login-action@v2.1.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Tag version (GitHub Packages) + run: docker tag asanrom/showdown-chatbot:latest ghcr.io/AgustinSRG/showdown-chatbot:$GITHUB_REF_NAME + + - name: Tag latest (GitHub Packages) + run: docker tag asanrom/showdown-chatbot:latest ghcr.io/AgustinSRG/showdown-chatbot:latest + + - name: Push the Docker image (GitHub Packages) (Current Version) + run: docker push ghcr.io/AgustinSRG/showdown-chatbot:$GITHUB_REF_NAME + + - name: Push the Docker image (GitHub Packages) (Latest) + run: docker push ghcr.io/AgustinSRG/showdown-chatbot:latest + diff --git a/package-lock.json b/package-lock.json index fe520f5..f48e62f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "showdown-chatbot", - "version": "2.8.8", + "version": "2.8.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "showdown-chatbot", - "version": "2.8.8", + "version": "2.8.9", "license": "MIT", "dependencies": { "busboy": "1.6.0", diff --git a/package.json b/package.json index 1d194d0..deb4c2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "showdown-chatbot", - "version": "2.8.8", + "version": "2.8.9", "author": { "name": "Agustin San Roman", "email": "agustinsanromanguzman@gmail.com",