This repository has been archived by the owner on Mar 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
60 lines (52 loc) · 2.71 KB
/
appveyor.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
image: Ubuntu
platform: x64
stack: node lts/*
services:
- docker
environment:
IMAGE_STABLE_TAG: 1
skip_tags: true
install:
- npm install
build_script:
- npm run build
test_script:
- curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import > /dev/null
- curl -Os https://uploader.codecov.io/latest/linux/codecov > /dev/null
- curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM > /dev/null
- curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig > /dev/null
- gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
- shasum -a 256 -c codecov.SHA256SUM
- chmod +x codecov
- ./codecov --disable=gcov
after_build:
# Login to GitHub Container Registry
- echo "${GHCR_PASSWORD}" | docker login "${GHCR_REGISTRY}" --username "${GHCR_USERNAME}" --password-stdin
# Build images from development branches and PRs
- if [[ "${APPVEYOR_REPO_BRANCH}" != "master" ]] || [[ ! -z "${APPVEYOR_PULL_REQUEST_NUMBER}" ]]; then docker build -t "${GHCR_REGISTRY}/${APPVEYOR_REPO_NAME}:${APPVEYOR_BUILD_VERSION}" .; fi
# Build images from master branch
- if [[ "${APPVEYOR_REPO_BRANCH}" == "master" ]] && [[ -z "${APPVEYOR_PULL_REQUEST_NUMBER}" ]]; then docker build -t "${GHCR_REGISTRY}/${APPVEYOR_REPO_NAME}:${APPVEYOR_BUILD_VERSION}" -t "${GHCR_REGISTRY}/${APPVEYOR_REPO_NAME}:${IMAGE_STABLE_TAG}" -t "${GHCR_REGISTRY}/${APPVEYOR_REPO_NAME}:latest" .; fi
# Push all images
- if [[ "${APPVEYOR_REPO_BRANCH}" == "master" ]] && [[ -z "${APPVEYOR_PULL_REQUEST_NUMBER}" ]]; then docker push "${GHCR_REGISTRY}/${APPVEYOR_REPO_NAME}" --all-tags; fi
# Logout
- docker logout
# Login to Docker Hub
- echo "${DH_PASSWORD}" | docker login --username "${DH_USERNAME}" --password-stdin
# Build images from development branches and PRs
- if [[ "${APPVEYOR_REPO_BRANCH}" != "master" ]] || [[ ! -z "${APPVEYOR_PULL_REQUEST_NUMBER}" ]]; then docker build -t "${APPVEYOR_REPO_NAME}:${APPVEYOR_BUILD_VERSION}" .; fi
# Build images from master branch
- if [[ "${APPVEYOR_REPO_BRANCH}" == "master" ]] && [[ -z "${APPVEYOR_PULL_REQUEST_NUMBER}" ]]; then docker build -t "${APPVEYOR_REPO_NAME}:${APPVEYOR_BUILD_VERSION}" -t "${APPVEYOR_REPO_NAME}:${IMAGE_STABLE_TAG}" -t "${APPVEYOR_REPO_NAME}:latest" .; fi
# Push all images
- if [[ "${APPVEYOR_REPO_BRANCH}" == "master" ]] && [[ -z "${APPVEYOR_PULL_REQUEST_NUMBER}" ]]; then docker push "${APPVEYOR_REPO_NAME}" --all-tags; fi
# Logout
- docker logout
deploy:
release: ${APPVEYOR_BUILD_VERSION}
description: '${APPVEYOR_BUILD_VERSION}'
provider: GitHub
auth_token:
secure: GQ6S8lClIQ7rjkrGA6E3vEKM0MAhzD/R7I36QjTthXh7OHF7BEcJiD7g12fw7QLA
draft: false
prerelease: false
on:
branch: master