Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Smartich0ke committed Aug 19, 2023
2 parents 01cc46c + e22859b commit 8da20b9
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI/CD Pipeline

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_CONTENT_TRUST: "0"
DOCKER_CONTENT_TRUST_SERVER: "https://notary.artichokenetwork.com"

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2

- name: Install Dependencies
run: composer install

- name: Copy .env.example to .env
run: cp .env.example .env

- name: Generate Laravel Key
run: php artisan key:generate

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Build assets
run: |
npm install
npm run build
- name: Run PHPUnit Tests
run: vendor/bin/phpunit

package:
needs: test
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Install Cosign
uses: sigstore/[email protected]

- name: Login to Docker Registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login harbor.artichokenetwork.com -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Build and Push Docker Image
run: |
docker build -t harbor.artichokenetwork.com/ferritecms/ferrite:latest .
docker push harbor.artichokenetwork.com/ferritecms/ferrite:latest
- name: Sign the Docker Image
run: cosign sign --yes --key env://COSIGN_PRIVATE_KEY harbor.artichokenetwork.com/ferritecms/ferrite:latest


0 comments on commit 8da20b9

Please sign in to comment.