forked from bioconda/bioconda-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (67 loc) · 2.31 KB
/
release-please.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
on:
push:
branches:
- master
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: arm64
image: bioconda-utils-build-env-cos7-aarch64
base_image: quay.io/condaforge/linux-anvil-aarch64
- arch: amd64
image: bioconda-utils-build-env-cos7
base_image: quay.io/condaforge/linux-anvil-cos7-x86_64
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
release-type: python
package-name: bioconda-utils
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
with:
fetch-depth: 0
- id: get-tag
if: ${{ steps.release.outputs.release_created }}
run: |
#tag=${{ github.event.release && github.event.release.tag_name || github.sha }}
tag=${{ steps.release.outputs.tag_name }}
printf %s "::set-output name=tag::${tag#v}"
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
if: ${{ steps.release.outputs.release_created }}
id: buildah-build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ matrix.image }}
arch: ${{ matrix.arch }}
build-args: |
BASE_IMAGE=${{ matrix.base_image }}
tags: >-
latest
${{ steps.get-tag.outputs.tag }}
dockerfiles: |
./Dockerfile
- name: Test Built Image
if: ${{ steps.release.outputs.release_created }}
run: |
image='${{ steps.buildah-build.outputs.image }}'
for tag in ${{ steps.buildah-build.outputs.tags }} ; do
podman run --rm "${image}:${tag}" bioconda-utils --version
done
- name: Push To Quay
if: ${{ steps.release.outputs.release_created }}
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.buildah-build.outputs.image }}
tags: ${{ steps.buildah-build.outputs.tags }}
registry: ${{ secrets.QUAY_BIOCONDA_REPO }}
username: ${{ secrets.QUAY_BIOCONDA_USERNAME }}
password: ${{ secrets.QUAY_BIOCONDA_TOKEN }}