-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding alpine build * Fixed quotes * Using flavor for the tags * Split action for quicker build * Removing branch tag * Updating documentation
- Loading branch information
1 parent
a486e4a
commit 86da76b
Showing
5 changed files
with
97 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,11 @@ on: | |
|
||
|
||
jobs: | ||
Docker: | ||
Slim: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- | ||
name: Checkout | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker | ||
|
@@ -33,18 +32,19 @@ jobs: | |
username: ${{ secrets.GITLAB_USER }} | ||
password: ${{ secrets.GITLAB_TOKEN }} | ||
|
||
|
||
- name: Docker meta | ||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: cyb3rjak3/pypy-flask,ghcr.io/cyb3r-jak3/pypy-flask,registry.gitlab.com/cyb3r-jak3/pypy-flask | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=sha | ||
labels: | | ||
org.label-schema.vcs-url=https://github.com/Cyb3r-Jak3/pypy-flask.git | ||
org.label-schema.schema-version=1.0.0-rc1 | ||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
|
@@ -56,10 +56,10 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: buildx-${{ github.sha }} | ||
restore-keys: buildx | ||
key: buildx-slim-${{ github.sha }} | ||
restore-keys: buildx-slim | ||
|
||
- name: Build and Push | ||
- name: Slim Build and Push | ||
uses: docker/[email protected] | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
|
@@ -68,3 +68,71 @@ jobs: | |
push: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
file: Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
Alpine: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Login To GitHub | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
|
||
- name: Login To GitLab | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: registry.gitlab.com | ||
username: ${{ secrets.GITLAB_USER }} | ||
password: ${{ secrets.GITLAB_TOKEN }} | ||
|
||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: cyb3rjak3/pypy-flask,ghcr.io/cyb3r-jak3/pypy-flask,registry.gitlab.com/cyb3r-jak3/pypy-flask | ||
flavor: | | ||
suffix=-alpine | ||
tags: | | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=sha | ||
labels: | | ||
org.label-schema.vcs-url=https://github.com/Cyb3r-Jak3/pypy-flask.git | ||
org.label-schema.schema-version=1.0.0-rc1 | ||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Cache Docker layers | ||
uses: actions/[email protected] | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: buildx-alpine-${{ github.sha }} | ||
restore-keys: buildx-alpine | ||
|
||
- name: Alpine Build and Push | ||
uses: docker/[email protected] | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
push: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
file: alpine.Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM jamiehewland/alpine-pypy:alpine3.11 | ||
|
||
|
||
RUN apk add --no-cache libffi-dev gcc musl-dev make build-base | ||
|
||
COPY requirements.txt /tmp/pip-tmp/ | ||
RUN pip --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ | ||
&& rm -rf /tmp/pip-tmp | ||
|
||
RUN apk del libffi-dev gcc musl-dev make build-base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==2.0.1 | ||
gevent==21.1.2 | ||
gunicorn==20.1.0 | ||
gunicorn==20.1.0 | ||
gevent==21.1.2 |