Skip to content

V2

V2 #610

Workflow file for this run

name: CI/CD
on: # rebuild any PRs and main branch changes
pull_request:
release:
types: [created, published, edited]
push:
branches:
- master
- "releases/*"
jobs:
ci:
name: Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
with:
version: 8
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Run integration tests
run: pnpm run test
cd:
name: Deployment
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: manusa/actions-publish-docker@db938e45d2a3487e0eab9646e83550f554c17af3
name: Build & publish Docker image
with:
name: 47ng/actions-clever-cloud
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
include pull requests: true
tag script: |
const tag = context.ref
.replace('refs/heads/', '')
.replace('refs/tags/', '')
.replace('refs/pull/', '')
.replace(/\//g, '_')
.replace(/#/g, '');
return tag === 'master' ? 'latest' : tag;