-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (54 loc) · 1.68 KB
/
trivydb-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Release
jobs:
release:
if: github.repository_owner == 'jenkins-x'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
token: ${{ secrets.GIT_BOT_TOKEN }}
- uses: fusion-engineering/setup-git-credentials@v2
with:
credentials: ${{ format('https://x-access-token:{0}@github.com/', secrets.GIT_BOT_TOKEN) }}
- id: prep
name: next release version
uses: jenkins-x-plugins/jx-release-version@v2.4.13
- env:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
REPO_NAME: ${{ github.event.repository.name }}
VERSION: ${{ steps.prep.outputs.version }}
name: changelog
uses: docker://ghcr.io/jenkins-x/jx-changelog:0.0.47
with:
entrypoint: .github/workflows/jenkins-x/changelog.sh
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: jenkins-x
password: ${{ secrets.GIT_BOT_TOKEN }}
- name: Build and push trivydb
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |
VERSION=${{ steps.prep.outputs.version }}
tags: |
ghcr.io/jenkins-x/trivydb:latest
ghcr.io/jenkins-x/trivydb:${{ steps.prep.outputs.version }}
on:
push:
branches:
- main
- master
schedule:
- cron: "0 6 * * *" #build project everyday at hour 6, minute 0 (aka 06:00)