Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(docker): fix docker release tags #1723

Merged
merged 9 commits into from
Dec 30, 2023
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
Loading