-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (51 loc) · 1.37 KB
/
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
55
---
name: Release
on:
push:
tags:
- v*
workflow_dispatch: {}
jobs:
build:
name: Build and push container
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
file: cli.Dockerfile
push: true
platforms: linux/amd64,linux/ppc64le
tags: quay.io/projectquay/clair-action:${{ github.ref_name }}
build-args: |
CLAIR_ACTION_VERSION=${{ github.ref_name }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Check Dockerfile
shell: bash
run: |
sed -i 's/clair-action:v.*/clair-action:${{ github.ref_name }}/' Dockerfile
git diff --exit-code
release:
name: Release
runs-on: 'ubuntu-latest'
steps:
- name: Create Release
uses: ncipollo/release-action@v1
id: create_release
with:
name: ${{ github.ref_name }} Release
tag: ${{ github.ref_name }}