-
Notifications
You must be signed in to change notification settings - Fork 6
69 lines (59 loc) · 1.81 KB
/
ci-dev.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
pull_request:
branches: ["main"]
push:
jobs:
ci:
uses: qiime2/distributions/.github/workflows/lib-ci-dev.yaml@dev
with:
distro: shotgun
additional-reports-path: ./coverage.xml
additional-reports-name: coverage
coverage:
needs: [ci]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
name: 'Fetch coverage from builds'
with:
name: ${{ needs.ci.outputs.additional-reports-name }}
path: ${{ needs.ci.outputs.additional-reports-path }}
- uses: codecov/codecov-action@v3
name: 'Upload coverage'
with:
fail_ci_if_error: true
build-docker-image:
# needs: [coverage]
runs-on: ubuntu-latest
steps:
- name: Prepare tags
id: prep
env:
DOCKER_REPO: ${{ secrets.DOCKER_REPO }}
run: |
TAGS="${DOCKER_REPO}:${GITHUB_SHA::8}"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Print the latest tag
run: echo ${{ steps.prep.outputs.tags }}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Quay Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
#push: ${{ github.event.pull_request.merged }}
push: true
tags: ${{ steps.prep.outputs.tags }}