From 9227b8fce9d68bf92eb37863fe4adf4cb406b61c Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Sun, 11 Dec 2022 01:11:07 +0700 Subject: [PATCH] ci: add docker push --- .github/workflows/docker.yml | 6 ++++-- Dockerfile | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9dc474f..50309eb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,7 +14,9 @@ jobs: - name: Log into GitHub Container Registry run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build the Docker image - run: docker build . --file Dockerfile --tag ghcr.io/sinkaroid/jandapress:latest + run: | + docker build . -t ghcr.io/sinkaroid/jandapress:${{ steps.tags.outputs.name }} - name: Push the Docker image - run: docker push ghcr.io/sinkaroid/jandapress:latest + run: | + docker push ghcr.io/sinkaroid/jandapress:${{ steps.tags.outputs.name }} diff --git a/Dockerfile b/Dockerfile index 29d2255..1f78247 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,5 @@ COPY package*.json ./ RUN npm install COPY . . RUN npm run build -EXPOSE 3001 +EXPOSE 3000 CMD ["node", "build/src/index.js"] \ No newline at end of file