-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (66 loc) · 2.48 KB
/
release-lapis.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
name: Release LAPIS
on:
workflow_run:
workflows: [LAPIS]
types: [completed]
branches: [main]
env:
LAPIS_DOCKER_IMAGE_NAME: ghcr.io/genspectrum/lapis
DOCS_DOCKER_IMAGE_NAME: ghcr.io/genspectrum/lapis-docs
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
packages: write
checks: read
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'GenSpectrum/LAPIS' }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
path: .
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
include-component-in-tag: true
target-branch: main
- name: Inspect Release Outputs
run: |
cat <<'EOF'
${{ toJson(steps.release.outputs) }}
EOF
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Set up Docker Buildx
if: ${{ steps.release.outputs.release_created }}
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ steps.release.outputs.release_created }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for Lapis Docs Docker Image
if: ${{ steps.release.outputs.release_created }}
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.sha }}
check-name: Build Docs Docker Image And Run E2E Tests
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Tag Already Built Images With Release Tags
if: ${{ steps.release.outputs.release_created }}
run: |
MAJOR=${{ steps.release.outputs.major }}
MINOR=${{ steps.release.outputs.minor }}
PATCH=${{ steps.release.outputs.patch }}
TAGS=("$MAJOR.$MINOR" "$MAJOR.$MINOR.$PATCH")
# TODO (#777) include $MAJOR only for releases >= 1.0
# TAGS=("$MAJOR" "$MAJOR.$MINOR" "$MAJOR.$MINOR.$PATCH") - don't include major-only for pre-1.0
IMAGES=("${{ env.LAPIS_DOCKER_IMAGE_NAME }}" "${{ env.DOCS_DOCKER_IMAGE_NAME }}")
for IMAGE in "${IMAGES[@]}"; do
for TAG in "${TAGS[@]}"; do
docker buildx imagetools create --tag $IMAGE:$TAG $IMAGE:latest
done
done