Skip to content

Create cve-scanner.yml (#249) #85

Create cve-scanner.yml (#249)

Create cve-scanner.yml (#249) #85

Workflow file for this run

name: Continuous Delivery Workflow for the Parameter Page web application
on:
push:
branches:
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
Build-Dockerize-Push:
runs-on: ubuntu-latest
steps:
- name: Checking out source code
uses: actions/checkout@v3
- name: Generate test configuration
run: |
cp .env-test .env
- uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Building web application
run: |
flutter pub get
flutter build web
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: adregistry.fnal.gov/applications/parameter-page
tags: |
# This is the default tag for the last commit of the default branch
type=edge
# This sets the latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ github.run_number }},enable={{is_default_branch}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to AD Registry, Harbor
uses: docker/login-action@v2
with:
registry: adregistry.fnal.gov
username: ${{ secrets.ADREGISTRY_USERNAME }}
password: ${{ secrets.ADREGISTRY_SECRET }}
- name: Building Docker image and pushing to adregistry
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Dockerize-integration-test:
runs-on: ubuntu-latest
steps:
- name: Checking out source code
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: adregistry.fnal.gov/applications/parameter-page-integration-test
tags: |
# This is the default tag for the last commit of the default branch
type=edge
# This sets the latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ github.run_number }},enable={{is_default_branch}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to AD Registry, Harbor
uses: docker/login-action@v3
with:
registry: adregistry.fnal.gov
username: ${{ secrets.ADREGISTRY_USERNAME }}
password: ${{ secrets.ADREGISTRY_SECRET }}
- name: Building Docker image and pushing to adregistry
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.test
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}