Skip to content

Commit

Permalink
build(docker): fix docker release tags (#1723)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou authored Dec 30, 2023
1 parent ff926bf commit caaca54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Create and publish a Docker image

on:
push:
branches: ['master', 'develop']
branches:
- 'develop'
tags:
- 'v*'
pull_request:
Expand All @@ -25,6 +26,7 @@ jobs:
uses: actions/checkout@v4

- name: Log in to the Container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -37,11 +39,12 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=edge,branch=develop
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
push-version-number:
runs-on: ubuntu-latest
steps:
- name: Clone develop repository
- name: Checkout develop branch
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
Expand Down Expand Up @@ -50,6 +50,7 @@ jobs:

release:
needs: ['update-master-branch']
name: Build and release
runs-on: ubuntu-latest
steps:
- name: Fetch repo
Expand Down Expand Up @@ -92,7 +93,7 @@ jobs:
with:
name: v${{ github.event.inputs.version }}
tag_name: v${{ github.event.inputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT }}
files: ./mainsail.zip
body: ${{ steps.generate-changelog.outputs.content }}

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk add zip
WORKDIR /app
COPY package*.json /app/

RUN npm install
RUN npm ci

COPY ./ /app/

Expand Down

0 comments on commit caaca54

Please sign in to comment.