-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a09c2e7
commit 38aa831
Showing
3 changed files
with
28 additions
and
75 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
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
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 |
---|---|---|
|
@@ -5,69 +5,45 @@ on: | |
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
types: [release_master] | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: master | ||
|
||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
|
||
- uses: docker/setup-buildx-action@v3 | ||
with: | ||
install: true | ||
|
||
- name: Set variables | ||
id: vars | ||
run: | | ||
echo ::set-output name=repo_name::$(echo ${GITHUB_REPOSITORY#*/*}) | ||
- uses: docker/metadata-action@v5 | ||
id: docker_meta | ||
with: | ||
images: ${{ github.repository }} | ||
|
||
- uses: docker/build-push-action@v5 | ||
with: | ||
load: true | ||
build-args: | | ||
APP_HOME=/home/node/${{ steps.vars.outputs.repo_name }} | ||
tags: ${{ github.repository }} | ||
labels: ${{ steps.docker_meta.outputs.labels }} | ||
|
||
- uses: actions/setup-node@v4 | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Install Dependencies | ||
run: npm clean-install | ||
|
||
- run: npx [email protected] | ||
- name: Git Config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Restorecommerce Bot" | ||
- name: Build | ||
run: npm run build -- --verbose | ||
|
||
- name: NPM Token | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > .npmrc | ||
- uses: benc-uk/workflow-dispatch@v1 | ||
with: | ||
workflow: upgrade-services.yaml | ||
ref: master | ||
repo: restorecommerce/charts | ||
token: "${{ secrets.CHARTS_WORKFLOW_TOKEN }}" | ||
- name: Release | ||
run: npx lerna publish --no-verify-access --no-private --conventional-commits --yes --loglevel debug | ||
|
||
- name: Sync next branch | ||
run: | | ||
git checkout next | ||
git merge master | ||
git push -u origin next |