Skip to content

update mobile version #168

update mobile version

update mobile version #168

name: genparker-pipeline
on:
push:
branches:
- 'main'
env:
BEFORE_SHA: ${{ github.event.before }}
DOCKER_ENVIRONMENT: 'latest'
jobs:
init:
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.setvars.outputs.environment }}
branch: ${{ steps.setvars.outputs.branch }}
steps:
- name: Set variables
id: setvars
run: |
echo "::set-output name=environment::production"
echo "::set-output name=branch::main"
docker:
runs-on: ubuntu-latest
needs: init
steps:
- name: 'Build:checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'login'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run: npm i --ignore-scripts
- uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '17'
- name: publish affected
run: npx nx affected --target=publish --head=${{needs.init.outputs.branch}} --base=$BEFORE_SHA --configuration=${{needs.init.outputs.environment}} --parallel=5
- name: 'cp for kustomize'
run: |
cp -r configs/genparker/base configs/genparker/overlay/philantropy/base & \
cp configs/genparker/overlay/kustomization.yml configs/genparker/overlay/philantropy
- name: 'Kustomize Build'
uses: int128/kustomize-action@v1
id: kustomize
with:
kustomization: 'overlay/*/kustomization.yml'
base-directory: 'configs/genparker'
- run: cp -r ${{ steps.kustomize.outputs.directory }} deployment_configs
- name: Update with kustomize
run: |
git add -A
git config --global user.name 'GenParker'
git config --global user.email '[email protected]'
git commit -am "Updating the project's structure"
git push -f origin main:deployment/philantropy