Skip to content

Commit 7b25fb3

Browse files
author
Joe Cardella
committed
Initial commit
0 parents  commit 7b25fb3

File tree

6 files changed

+124
-0
lines changed

6 files changed

+124
-0
lines changed

.github/workflows/default.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Create and publish Docker image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: phase2/diffy
12+
13+
jobs:
14+
build-and-push-image:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
24+
- name: Log in to the GitHub container registry
25+
uses: docker/login-action@v2
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Extract metadata (tags, labels) for Docker
32+
id: meta
33+
uses: docker/metadata-action@v4
34+
with:
35+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
36+
37+
- name: Set up QEMU
38+
uses: docker/setup-qemu-action@v2
39+
with:
40+
platforms: all
41+
42+
- name: Set up Buildx
43+
id: buildx
44+
uses: docker/setup-buildx-action@v2
45+
46+
- name: Build and push the Docker image
47+
uses: docker/build-push-action@v3
48+
with:
49+
builder: ${{ steps.buildx.outputs.name }}
50+
context: ./src
51+
platforms: linux/amd64,linux/arm64
52+
push: true
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}
55+

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Files produced by bad patch & diff runs
2+
*~*~
3+
*.rej
4+
*.diff
5+
*.orig
6+
interdiff*.txt
7+
8+
# IDE artifacts
9+
*~
10+
\#*\#
11+
*.swp
12+
.DS*
13+
._.DS*
14+
.project
15+
.idea
16+
.vscode
17+
.history

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Phase2 Technology
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Phase2 docker-diffy
2+
3+
> Docker image for using the diffy cli tool.
4+
5+
This Docker image adds the [diffy cli](https://github.com/DiffyWebsite/diffy-cli) tool to the base `alpine:latest` image.
6+
7+
## Image generation
8+
9+
* To generate new images for the latest diffy cli version:
10+
* * Go to the [diffy cli repo](https://github.com/DiffyWebsite/diffy-cli) and find the latest version.
11+
* * Update the `src/Dockerfile` and set the docker image tag to the latest version number: ex `0.1.22`
12+
* * Commit and tag the main branch with `v` followed by the version number: ex `v0.1.22`
13+
* * Push the udpates and tag upstream.
14+
15+
## Security Reports
16+
17+
Please email outrigger@phase2technology.com with security concerns.
18+
19+
## Maintainers
20+
21+
[![Phase2 Logo](https://s3.amazonaws.com/phase2.public/logos/phase2-logo.png)](https://www.phase2technology.com)

build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
set -ex
4+
5+
docker build -t phase2/diffy ./src

src/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM alpine:latest
2+
RUN apk update && \
3+
apk add openssl php php-openssl php-phar php-iconv && \
4+
wget -O /usr/local/bin/diffy https://github.com/DiffyWebsite/diffy-cli/releases/download/0.1.22/diffy.phar && \
5+
chmod u+x /usr/local/bin/diffy

0 commit comments

Comments
 (0)