-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'typescript-docker' into javascript-docker
# Conflicts: # .github/workflows/template-updater.yml # .github/workflows/test-release.yml # package-lock.json # package.json
- Loading branch information
Showing
3 changed files
with
2,901 additions
and
3,596 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
name: Test & Release | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
branches-ignore: | ||
- 'gh-pages' | ||
- 'depfu/**' | ||
- 'dependabot/**' | ||
- 'template-updater/**' | ||
pull_request: null | ||
|
||
jobs: | ||
tests: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
if: contains(toJson(github.event.commits.*.message), '[skip ci]') == false || github.ref == 'refs/heads/main' | ||
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] | ||
|
@@ -30,7 +32,7 @@ jobs: | |
license-checker: | ||
name: License Checker | ||
runs-on: ubuntu-latest | ||
if: contains(toJson(github.event.commits.*.message), '[skip ci]') == false || github.ref == 'refs/heads/main' | ||
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 | ||
|
@@ -239,6 +241,7 @@ jobs: | |
exit 1 | ||
fi | ||
- name: 🔄 Push container to DockerHub | ||
id: docker-build-dh | ||
if: ${{ env.PUSH_TO_DOCKERHUB == 'true' }} | ||
uses: docker/build-push-action@v3 | ||
with: | ||
|
@@ -261,7 +264,8 @@ jobs: | |
ghcr.io/${{ github.repository }}:build-container-${{ hashFiles('package*.json') }} | ||
cache-to: type=inline | ||
outputs: | ||
digest: ${{ steps.docker-build-2.outputs.digest }} | ||
digest-gh: ${{ steps.docker-build-2.outputs.digest }} | ||
digest-dh: ${{ steps.docker-build-dh.outputs.digest }} | ||
|
||
release: | ||
name: Release | ||
|
@@ -282,6 +286,12 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'npm' | ||
- name: 🔧 Setup regclient | ||
run: | | ||
mkdir -p "$HOME/.local/bin" | ||
curl -L https://github.com/regclient/regclient/releases/latest/download/regctl-linux-amd64 > "$HOME/.local/bin/regctl" | ||
chmod +x "$HOME/.local/bin/regctl" | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: 📦 Install dependencies | ||
run: npm ci | ||
- name: 📂 Create docs folder | ||
|
@@ -297,23 +307,6 @@ jobs: | |
with: | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: ⬇️ Pull GitHub Containers | ||
id: github | ||
run: | | ||
docker pull "${IMAGE}@${DIGEST}" | ||
echo "::set-output name=image::${IMAGE}@${DIGEST}" | ||
env: | ||
IMAGE: ghcr.io/${{ github.repository }} | ||
DIGEST: ${{ needs.docker-image.outputs.digest }} | ||
- name: ⬇️ Pull Docker Hub Containers | ||
if: ${{ env.PUSH_TO_DOCKERHUB == 'true' }} | ||
id: dockerhub | ||
run: | | ||
docker pull "${IMAGE}@${DIGEST}" | ||
echo "::set-output name=image::${IMAGE}@${DIGEST}" | ||
env: | ||
IMAGE: ${{ github.repository }} | ||
DIGEST: ${{ needs.docker-image.outputs.digest }} | ||
- name: 🪄 Run semantic-release | ||
run: BRANCH=${GITHUB_REF#refs/heads/} npx semantic-release | ||
env: | ||
|
@@ -324,11 +317,11 @@ jobs: | |
GITHUB_NPM_TOKEN: ${{ secrets.GH_TOKEN }} | ||
PUBLIC_NPM_CONFIG_REGISTRY: https://registry.npmjs.org | ||
PUBLIC_NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
DOCKER_LOCAL_IMAGE_GH: ${{ steps.github.outputs.image }} | ||
DOCKER_LOCAL_IMAGE_DH: ${{ steps.dockerhub.outputs.image }} | ||
DOCKER_LOCAL_IMAGE_GH: ghcr.io/${{ github.repository }}:${{ github.sha }} | ||
DOCKER_LOCAL_IMAGE_DH: ${{ github.repository }}:${{ github.sha }} | ||
- name: 🔃 Merge main back into develop | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: everlytic/[email protected].2 | ||
uses: everlytic/[email protected].3 | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
source_ref: 'main' | ||
|
Oops, something went wrong.