-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (52 loc) · 1.6 KB
/
docker.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
name: CI-Docker
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract DOCKER_TAG using tag name
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "DOCKER_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Use default DOCKER_TAG
if: startsWith(github.ref, 'refs/tags/') != true
run: |
echo "DOCKER_TAG=latest" >> $GITHUB_ENV
- name: Login to Github registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Set lowercase repository name
run: |
echo "REPOSITORY_LC=${REPOSITORY,,}" >>${GITHUB_ENV}
env:
REPOSITORY: '${{ github.repository }}'
- uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ env.REPOSITORY_LC }}:${{ env.DOCKER_TAG }}
build-args: |
SWIFLINT_DOCKER_IMAGE=ghcr.io/realm/swiftlint:0.52.3
CARTON_TAG=0.20.0
SWIFT_DOCKER_IMAGE=swift:5.9.0-jammy
SWIFT_TAG=wasm-5.9.1-RELEASE
SWIFT_FORMAT_TAG=508.0.1
NODE_VERSION=18.x
OPEN_JDK_VERSION=11
CYPRESS_VERSION=12.3.0
CHROME_VERSION=120.0.6099.216
CHROME_DRIVER_VERSION=114.0.5735.90
FIREFOX_VERSION=99.0.1
SYMBOLICATOR_VERSION=0.5.0