Skip to content

Commit 25c45b3

Browse files
authored
Merge pull request #64 from beevelop/update
Update image
2 parents 36f4f2e + 66e485b commit 25c45b3

File tree

5 files changed

+89
-16
lines changed

5 files changed

+89
-16
lines changed

.github/workflows/docker.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Docker Image
2+
3+
on:
4+
schedule:
5+
- cron: "0 15 * * *" # everyday at 3pm
6+
push:
7+
branches: ["**"]
8+
tags: ["v*.*.*"]
9+
10+
env:
11+
platforms: linux/amd64
12+
13+
jobs:
14+
main:
15+
runs-on: ubuntu-20.04
16+
timeout-minutes: 30
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v2
20+
- name: Set imageName based on the repository name
21+
id: step_one
22+
run: |
23+
imageName="${GITHUB_REPOSITORY/docker-/}"
24+
echo $imageName
25+
echo "imageName=$imageName" >> $GITHUB_ENV
26+
- name: Docker meta
27+
id: docker_meta
28+
uses: crazy-max/ghaction-docker-meta@v1
29+
with:
30+
images: ${{ env.imageName }}
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v1
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v1
35+
- name: Login to Harbor
36+
uses: docker/login-action@v1
37+
with:
38+
username: ${{ secrets.DOCKERHUB_USERNAME }}
39+
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
- name: Buildx cache
41+
uses: actions/cache@v1
42+
with:
43+
path: ${{ github.workspace }}/cache
44+
key: ${{ runner.os }}-docker-${{ hashfiles('cache/**') }}
45+
restore-keys: |
46+
${{ runner.os }}-docker
47+
- name: Build and push
48+
id: docker_build
49+
uses: docker/build-push-action@v2
50+
with:
51+
platforms: ${{ env.platforms }}
52+
push: ${{ github.event_name != 'pull_request' }}
53+
tags: ${{ steps.docker_meta.outputs.tags }}
54+
labels: ${{ steps.docker_meta.outputs.labels }}
55+
cache-from: type=local,src=${{ github.workspace }}/cache
56+
cache-to: type=local,dest=${{ github.workspace }}/cache
57+
# temporarily disabled until https://github.com/aquasecurity/trivy-action/issues/22 is resolved
58+
# - name: Run Trivy vulnerability scanner
59+
# uses: aquasecurity/trivy-action@master
60+
# with:
61+
# image-ref: ${{ env.imageName }}:${{ steps.docker_meta.outputs.version }}
62+
# format: "template"
63+
# template: "@/contrib/sarif.tpl"
64+
# output: "trivy-results.sarif"
65+
# - name: Upload Trivy scan results to GitHub Security tab
66+
# uses: github/codeql-action/upload-sarif@v1
67+
# with:
68+
# sarif_file: "trivy-results.sarif"

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
FROM beevelop/android-nodejs
22

3-
MAINTAINER Maik Hummel <m@ikhummel.com>
4-
5-
ENV CORDOVA_VERSION 9.0.0
3+
ENV CORDOVA_VERSION 10.0.0
64

75
WORKDIR "/tmp"
86

9-
RUN npm i -g --unsafe-perm cordova@${CORDOVA_VERSION}
7+
RUN npm i -g --unsafe-perm cordova@${CORDOVA_VERSION} && \
8+
cordova -v && \
9+
cd /tmp && \
10+
cordova create myApp com.myCompany.myApp myApp && \
11+
cd myApp && \
12+
cordova plugin add cordova-plugin-camera --save && \
13+
cordova platform add android --save && \
14+
cordova requirements android && \
15+
cordova build android --verbose && \
16+
rm -rf /tmp/myApp

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Maik Hummel
3+
Copyright (c) 2016-2021 Maik Hummel
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
[![Travis](https://shields.beevelop.com/travis/beevelop/docker-cordova.svg?style=flat-square)](https://travis-ci.org/beevelop/docker-cordova)
21
[![Pulls](https://shields.beevelop.com/docker/pulls/beevelop/cordova.svg?style=flat-square)](https://links.beevelop.com/d-cordova)
32
[![Layers](https://shields.beevelop.com/docker/image/layers/beevelop/cordova/latest.svg?style=flat-square)](https://links.beevelop.com/d-cordova)
43
[![Size](https://shields.beevelop.com/docker/image/size/beevelop/cordova/latest.svg?style=flat-square)](https://links.beevelop.com/d-cordova)
@@ -7,28 +6,35 @@
76
[![Beevelop](https://links.beevelop.com/honey-badge)](https://beevelop.com)
87

98
# Latest Cordova
9+
1010
### based on [beevelop/android-nodejs](https://github.com/beevelop/docker-android-nodejs)
11-
----
11+
12+
---
13+
1214
### Pull from Docker Hub
15+
1316
```
1417
docker pull beevelop/cordova:latest
1518
```
1619

1720
### Or build from GitHub
21+
1822
```
1923
docker build -t beevelop/cordova github.com/beevelop/docker-cordova
2024
```
2125

2226
### Run image
27+
2328
```
2429
docker run -it beevelop/cordova bash
2530
```
2631

2732
### Or use as base image
33+
2834
```Dockerfile
2935
FROM beevelop/cordova:latest
3036
```
3137

32-
----
38+
---
3339

3440
![One does not simply use latest](https://i.imgflip.com/1fgwxr.jpg)

0 commit comments

Comments
 (0)