-
Notifications
You must be signed in to change notification settings - Fork 3
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
20e33ce
commit 0a71faf
Showing
2 changed files
with
44 additions
and
53 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 |
---|---|---|
|
@@ -4,40 +4,39 @@ name: build, push to registry and tests | |
on: | ||
push: | ||
branches-ignore: | ||
- 'development/**' | ||
- "development/**" | ||
|
||
env: | ||
NAMESPACE: 'zenko-ui-dev' | ||
REGISTRY: 'registry.scality.com' | ||
NAMESPACE: "scality/zenko-ui/dev" | ||
REGISTRY: "ghcr.io" | ||
|
||
jobs: | ||
|
||
oras: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Oras | ||
run: | | ||
curl -LO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz | ||
mkdir -p oras-install/ | ||
sudo tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C /usr/local/bin oras | ||
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/ | ||
env: | ||
ORAS_VERSION: '0.12.0' | ||
|
||
- name: Oras login | ||
run: oras login --username "${LOGIN}" --password "${PASSWORD}" ${REGISTRY} | ||
env: | ||
LOGIN: '${{ secrets.REGISTRY_LOGIN }}' | ||
PASSWORD: '${{ secrets.REGISTRY_PASSWORD }}' | ||
|
||
- name: push nginx and runtime-app-configuration | ||
run: | | ||
oras push ${REGISTRY}/${NAMESPACE}/zenko-ui-config:${{ github.sha }} \ | ||
runtime-app-configuration.gotempl:application/zenko-ui-runtime-config-template+json \ | ||
nginx.conf.gotempl:text/nginx-conf-template | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Oras | ||
run: | | ||
curl -LO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz | ||
mkdir -p oras-install/ | ||
sudo tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C /usr/local/bin oras | ||
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/ | ||
env: | ||
ORAS_VERSION: "0.12.0" | ||
|
||
- name: Oras login | ||
run: oras login --username "${LOGIN}" --password "${PASSWORD}" ${REGISTRY} | ||
env: | ||
LOGIN: "${{ github.actor }}" | ||
PASSWORD: "${{ github.token }}" | ||
|
||
- name: push nginx and runtime-app-configuration | ||
run: | | ||
oras push ${REGISTRY}/${NAMESPACE}/zenko-ui-config:${{ github.sha }} \ | ||
runtime-app-configuration.gotempl:application/zenko-ui-runtime-config-template+json \ | ||
nginx.conf.gotempl:text/nginx-conf-template | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
@@ -50,25 +49,18 @@ jobs: | |
|
||
- uses: actions/[email protected] | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
node-version: "16" | ||
cache: "npm" | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to Scality Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ secrets.REGISTRY_LOGIN }} | ||
password: ${{ secrets.REGISTRY_PASSWORD}} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: install dependencies | ||
run: npm config set unsafe-perm true && npm ci | ||
|
@@ -82,8 +74,7 @@ jobs: | |
push: true | ||
context: . | ||
tags: | | ||
ghcr.io/${{ github.repository }}/zenko-ui:${{ github.sha }} | ||
${{env.REGISTRY}}/${{env.NAMESPACE}}/zenko-ui:${{ github.sha }} | ||
${{env.REGISTRY}}/${{env.NAMESPACE}}:${{ github.sha }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
|
@@ -93,8 +84,8 @@ jobs: | |
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
node-version: "16" | ||
cache: "npm" | ||
- name: install dependencies | ||
run: npm config set unsafe-perm true && npm ci | ||
- name: run eslint test | ||
|
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,11 +5,11 @@ on: | |
release: | ||
types: [published] | ||
env: | ||
DEV_NAMESPACE: 'zenko-ui-dev' | ||
PROD_NAMESPACE: 'zenko-ui' | ||
REGISTRY: 'registry.scality.com' | ||
CONFIG_IMAGE: 'zenko-ui-config' | ||
UI_IMAGE: 'zenko-ui' | ||
DEV_NAMESPACE: "scality/zenko-ui/dev" | ||
PROD_NAMESPACE: "scality/zenko-ui" | ||
REGISTRY: "ghcr.io" | ||
CONFIG_IMAGE: "zenko-ui-config" | ||
UI_IMAGE: "zenko-ui" | ||
|
||
jobs: | ||
retag-docker-image: | ||
|
@@ -19,25 +19,25 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Registry | ||
- name: Login to registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ secrets.REGISTRY_LOGIN }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install Oras | ||
run: | | ||
curl -LO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz | ||
mkdir -p oras-install/ | ||
sudo tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C /usr/local/bin oras | ||
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/ | ||
env: | ||
ORAS_VERSION: '0.12.0' | ||
ORAS_VERSION: "0.12.0" | ||
- name: Oras login | ||
run: oras login --username "${LOGIN}" --password "${PASSWORD}" ${REGISTRY} | ||
env: | ||
LOGIN: '${{ secrets.REGISTRY_LOGIN }}' | ||
PASSWORD: '${{ secrets.REGISTRY_PASSWORD }}' | ||
LOGIN: "${{ github.actor }}" | ||
PASSWORD: "${{ github.token }}" | ||
|
||
- name: push nginx and runtime-app-configuration | ||
run: | | ||
|