diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index 2c5c73ec8..8c81d5fab 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -2,7 +2,8 @@ name: Create and publish a Docker image on: push: - branches: ['master', 'develop'] + branches: + - 'develop' tags: - 'v*' pull_request: @@ -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 }} @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b660885f9..41308a323 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} @@ -50,6 +50,7 @@ jobs: release: needs: ['update-master-branch'] + name: Build and release runs-on: ubuntu-latest steps: - name: Fetch repo @@ -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 }} diff --git a/Dockerfile b/Dockerfile index 996ce325f..725a8af5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apk add zip WORKDIR /app COPY package*.json /app/ -RUN npm install +RUN npm ci COPY ./ /app/