Skip to content

Commit

Permalink
Merge pull request #207 from sebbo2002/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 authored Oct 25, 2023
2 parents a36117a + 9833e1d commit 46e9504
Show file tree
Hide file tree
Showing 8 changed files with 12,927 additions and 6,257 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/is-semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
if: ${{ startsWith(github.head_ref, 'depfu/batch_dev/') != true }}
steps:
- name: 🤖 is-semantic-release
uses: sebbo2002/action-is-semantic-pr@v1.0.2
uses: sebbo2002/action-is-semantic-pr@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
if: ${{ github.repository != 'sebbo2002/js-template' }}
steps:
- name: ☁️ Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: ☁️ Checkout ReleaseBot
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: sebbo2002/release-bot
path: ./.actions/release-bot
- name: 🔧 Setup node
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '20'
cache: 'npm'
- name: 📦 Install Dependencies
run: npm ci
Expand Down
58 changes: 32 additions & 26 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
if: github.repository != 'sebbo2002/js-template' && (contains(toJson(github.event.commits.*.message), '[skip ci]') == false || github.ref == 'refs/heads/main')
strategy:
matrix:
node: [14.x, 16.x, 18.x]
node: [16.x, 18.x, 20.x]
steps:
- name: ☁️ Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🔧 Setup node.js
uses: actions/setup-node@v3
with:
Expand All @@ -41,7 +41,7 @@ jobs:
if: github.repository != 'sebbo2002/js-template' && (contains(toJson(github.event.commits.*.message), '[skip ci]') == false || github.ref == 'refs/heads/main')
steps:
- name: ☁️ Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🔧 Setup node.js
uses: actions/setup-node@v3
with:
Expand All @@ -63,7 +63,7 @@ jobs:
if: contains(toJson(github.event.commits.*.message), '[skip ci]') == false || github.ref == 'refs/heads/main'
steps:
- name: ☁️ Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🔧 Setup node.js
uses: actions/setup-node@v3
with:
Expand All @@ -81,20 +81,20 @@ jobs:
PUSH_TO_DOCKERHUB: ${{ (github.repository != 'sebbo2002/js-template') && (secrets.DOCKERHUB_TOKEN != null) }}
steps:
- name: ☁️ Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🔧 Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: 🔐 Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🔐 Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
if: ${{ env.PUSH_TO_DOCKERHUB == 'true' }}
with:
username: ${{ github.repository_owner }}
Expand All @@ -103,22 +103,22 @@ jobs:
id: buildVars
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S')"
- name: 🪄 Build and push (1/2)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
continue-on-error: true
id: docker-build-1-1
with:
context: .
github-token: ${{ secrets.GITHUB_TOKEN }}
target: build-container
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
pull: true
push: true
tags: ghcr.io/${{ github.repository }}:build-container-${{ hashFiles('package*.json') }}
cache-from: ghcr.io/${{ github.repository }}:build-container-${{ hashFiles('package*.json') }}
cache-to: type=inline
- name: 🪄 Build and push (1/2, second try)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
continue-on-error: true
if: steps.docker-build-1-1.outcome=='failure'
id: docker-build-1-2
Expand All @@ -127,14 +127,14 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
target: build-container
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
pull: true
push: true
tags: ghcr.io/${{ github.repository }}:build-container-${{ hashFiles('package*.json') }}
cache-from: ghcr.io/${{ github.repository }}:build-container-${{ hashFiles('package*.json') }}
cache-to: type=inline
- name: 🪄 Build and push (1/2, third try)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
continue-on-error: true
if: steps.docker-build-1-2.outcome=='failure'
id: docker-build-1-3
Expand All @@ -143,7 +143,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
target: build-container
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
pull: true
push: true
tags: ghcr.io/${{ github.repository }}:build-container-${{ hashFiles('package*.json') }}
Expand All @@ -158,14 +158,14 @@ jobs:
exit 1
fi
- name: 🪄 Build and push (2/2)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
continue-on-error: true
id: docker-build-2-1
with:
context: .
github-token: ${{ secrets.GITHUB_TOKEN }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
pull: true
push: true
tags: |
Expand All @@ -182,15 +182,15 @@ jobs:
ghcr.io/${{ github.repository }}:cache-${{ hashFiles('package*.json') }}
ghcr.io/${{ github.repository }}:next
- name: 🪄 Build and push (2/2; second try)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
continue-on-error: true
if: steps.docker-build-2-1.outcome=='failure'
id: docker-build-2-2
with:
context: .
github-token: ${{ secrets.GITHUB_TOKEN }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
pull: true
push: true
tags: |
Expand All @@ -207,15 +207,15 @@ jobs:
ghcr.io/${{ github.repository }}:cache-${{ hashFiles('package*.json') }}
ghcr.io/${{ github.repository }}:next
- name: 🪄 Build and push (2/2; third try)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
if: steps.docker-build-2-2.outcome=='failure'
continue-on-error: true
id: docker-build-2-3
with:
context: .
github-token: ${{ secrets.GITHUB_TOKEN }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
pull: true
push: true
tags: |
Expand Down Expand Up @@ -251,12 +251,12 @@ jobs:
- name: 🔄 Push container to DockerHub
id: docker-build-dh
if: ${{ env.PUSH_TO_DOCKERHUB == 'true' }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
github-token: ${{ secrets.GITHUB_TOKEN }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: |
${{ github.repository }}:${{ github.sha }}
Expand Down Expand Up @@ -297,6 +297,11 @@ jobs:
concurrency: release
env:
PUSH_TO_DOCKERHUB: ${{ (github.repository != 'sebbo2002/js-template') && (secrets.DOCKERHUB_TOKEN != null) }}
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
needs:
- coverage
- tests
Expand All @@ -306,11 +311,11 @@ jobs:
if: ${{ github.repository != 'sebbo2002/js-template' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }}
steps:
- name: ☁️ Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🔧 Setup node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20.x
cache: 'npm'
- name: 🔧 Setup regclient
run: |
Expand All @@ -323,13 +328,13 @@ jobs:
- name: 📂 Create docs folder
run: mkdir ./docs
- name: 🔐 Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🔐 Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -340,6 +345,7 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_OWNER: ${{ github.repository_owner }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
DOCKER_LOCAL_IMAGE_GH: ghcr.io/${{ github.repository }}:${{ github.sha }}
DOCKER_LOCAL_IMAGE_DH: ${{ github.repository }}:${{ github.sha }}
GITLAB_URL: ${{ secrets.GITLAB_URL }}
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## [5.0.2-develop.3](https://github.com/sebbo2002/gitlab-badges/compare/v5.0.2-develop.2...v5.0.2-develop.3) (2023-10-18)


### Reverts

* Revert "ci: Run tests with node.js v18, v20 and v21" ([1b245a5](https://github.com/sebbo2002/gitlab-badges/commit/1b245a58587bc6871e8b1633beff1f1bca05970f))

## [5.0.2-develop.2](https://github.com/sebbo2002/gitlab-badges/compare/v5.0.2-develop.1...v5.0.2-develop.2) (2023-09-27)

## [5.0.2-develop.1](https://github.com/sebbo2002/gitlab-badges/compare/v5.0.1...v5.0.2-develop.1) (2023-08-24)


### Reverts

* Revert "ci: Downgrade is-semantic-release till it's fixed" ([91c2ab5](https://github.com/sebbo2002/gitlab-badges/commit/91c2ab59d0559a060c11d07973382c465dd3345d))

## [5.0.1](https://github.com/sebbo2002/gitlab-badges/compare/v5.0.0...v5.0.1) (2023-08-17)

## [5.0.1-develop.2](https://github.com/sebbo2002/gitlab-badges/compare/v5.0.1-develop.1...v5.0.1-develop.2) (2023-08-02)
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM node:lts-alpine@sha256:60ef0bed1dc2ec835cfe3c4226d074fdfaba571fd619c280474cc04e93f0ec5b as build-container
FROM node:lts-alpine@sha256:619ce27eb37c7c0476bd518085bf1ba892e2148fc1ab5dbaff2f20c56e50444d as build-container

WORKDIR "/app"

COPY package*.json "/app/"
RUN npm ci
RUN npm ci --verbose

COPY . "/app/"
RUN npm run build && \
rm -rf ./.github ./src ./test ./node_modules && \
ls -la /app


FROM node:lts-alpine@sha256:60ef0bed1dc2ec835cfe3c4226d074fdfaba571fd619c280474cc04e93f0ec5b
FROM node:lts-alpine@sha256:619ce27eb37c7c0476bd518085bf1ba892e2148fc1ab5dbaff2f20c56e50444d
ARG NODE_ENV=production
ENV NODE_ENV=$NODE_ENV
WORKDIR "/app"
Expand Down
Loading

0 comments on commit 46e9504

Please sign in to comment.