Skip to content

chore(deps): bump tough-cookie from 4.0.0 to 4.1.3 #253

chore(deps): bump tough-cookie from 4.0.0 to 4.1.3

chore(deps): bump tough-cookie from 4.0.0 to 4.1.3 #253

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Admin Panel API CI/CD Pipeline
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
project-directory: ./
jobs:
test:
name: Test API Project
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, 'skip-ci')
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: npm clean install
run: npm ci
working-directory: ${{ env.project-directory }}
- name: run ESLint
run: npm run lint
working-directory: ${{ env.project-directory }}
- name: build api project
run: npm run build
working-directory: ${{ env.project-directory }}
- name: run api tests
run: npm run test:ci
working-directory: ${{ env.project-directory }}
release:
name: Release semantic version
needs: test
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, 'skip-ci') &&
github.event_name == 'push' &&
github.repository == 'Greenstand/treetracker-admin-api'
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm i -g semantic-release @semantic-release/{git,exec,changelog}
- run: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
with:
path: ./
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build snapshot and push on merge
id: docker_build_release
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: greenstand/treetracker-admin-api:${{ steps.package-version.outputs.current-version }}
- id: export_bumped_version
run: |
export BUMPED_VERSION="${{ steps.package-version.outputs.current-version }}"
echo "::set-output name=bumped_version::${BUMPED_VERSION}"
- name: Install kustomize
run: curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
- name: Run kustomize
run: (cd deployment/overlays/development && ../../../kustomize edit set image greenstand/treetracker-admin-api:${{ steps.export_bumped_version.outputs.bumped_version }} )
- name: Commit dev kustomization file with new app version
if: |
!startsWith(github.event.head_commit.message, 'chore')
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am "chore: bump docker image tag ${{ steps.export_bumped_version.outputs.bumped_version }} [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}