Skip to content

CI: Migrate to Github Actions #7

CI: Migrate to Github Actions

CI: Migrate to Github Actions #7

Workflow file for this run

name: LineageOTA
on:
push:
branches:
- '2.0'
tags:
- "*"
pull_request:
branches:
- '2.0'
env:
_RELEASE_NAME: julianxhokaxhiu/lineageota
_RELEASE_VERSION: v0
_BUILD_VERSION: "2.9.0.${{ github.run_number }}"
_BUILD_BRANCH: "${{ github.ref }}"
jobs:
LineageOTA:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Prepare environment
run: ".github/workflows/prepare.ps1"
shell: pwsh
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: julianxhokaxhiu
password: "${{ secrets.DOCKERHUB_CI_DOCKER_PASSWORD }}"
- name: Build
uses: docker/build-push-action@v5
with:
tags: ${{ env._RELEASE_NAME }}:${{ env._RELEASE_VERSION }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env._RELEASE_NAME }}:${{ env._RELEASE_VERSION }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH,MEDIUM,LOW'
- name: Push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env._RELEASE_NAME }}:${{ env._RELEASE_VERSION }}