Pip Update: Bump gevent from 24.10.1 to 24.10.2 (#99) #370
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
name: Docker | |
on: | |
push: | |
branches: | |
- "**" | |
tags: | |
- 'v*' | |
paths: | |
- .github/workflows/docker.yml | |
- '*.Dockerfile' | |
- requirements.txt | |
- docker-bake.hcl | |
- matrix.json | |
permissions: | |
contents: read | |
packages: write | |
env: | |
DOCKER_USERNAME: cyb3rjak3 | |
GITLAB_USER: Cyb3r-Jak3 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
built_matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Load Matrix | |
shell: python | |
id: set-matrix | |
run: | | |
import json | |
import os | |
with open ('./matrix.json', 'r') as f: | |
data = json.load(f) | |
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: | |
print(f'matrix={data}', file=fh) | |
Bake: | |
needs: matrix | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
${{ insert }}: ${{ fromJson(needs.matrix.outputs.built_matrix) }} | |
steps: | |
- name: Login to my JFrog Artifactory | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.ARTIFACTORY_USER }} | |
password: ${{ secrets.ARTIFACTORY_TOKEN }} | |
registry: docker.jfrog.cyberjake.xyz | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker | |
uses: docker/login-action@v3 | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
username: ${{ env.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login To GitHub | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Login To GitLab | |
uses: docker/login-action@v3 | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
registry: registry.gitlab.com | |
username: ${{ env.GITLAB_USER }} | |
password: ${{ secrets.GITLAB_TOKEN }} | |
- name: Docker Meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
flavor: | | |
latest=false | |
images: cyb3rjak3/pypy-flask,ghcr.io/cyb3r-jak3/pypy-flask,registry.gitlab.com/cyb3r-jak3/pypy-flask,mine.jfrog.cyberjake.xyz/pypy-flask | |
tags: | | |
type=raw,value=${{ matrix.bake-target }}-${{ matrix.flask }}-${{ matrix.gunicorn }}-${{ matrix.gevent }} | |
labels: | | |
org.label-schema.vcs-url=https://github.com/Cyb3r-Jak3/pypy-flask.git | |
org.label-schema.schema-version=1.0.0-rc1 | |
maintainer=Cyb3r Jak3 git@cyberjake.xyz | |
org.opencontainers.image.vendor=cyb3rjak3 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
uses: docker/bake-action@v5 | |
with: | |
files: | | |
./docker-bake.hcl | |
${{ steps.meta.outputs.bake-file }} | |
targets: ${{ matrix.bake-target }}-release | |
push: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
pull: true | |
provenance: true | |
sbom: true | |
set: | | |
${{ matrix.bake-target }}-release.args.FLASK_VERSION=${{ matrix.flask }} | |
${{ matrix.bake-target }}-release.args.GUNICORN_VERSION=${{ matrix.gunicorn }} | |
${{ matrix.bake-target }}-release.args.GEVENT_VERSION=${{ matrix.gevent }} | |
${{ matrix.bake-target }}-release.cache-from=ghcr.io/cyb3r-jak3/pypy-flask-cache:${{ matrix.bake-target }} | |
${{ matrix.bake-target }}-release.cache-from=ghcr.io/cyb3r-jak3/pypy-flask-cache:${{ matrix.bake-target }}-${{ matrix.flask }}-${{ matrix.gunicorn }}-${{ matrix.gevent }} | |
${{ matrix.bake-target }}-release.cache-to=type=registry,mode=max,ref=ghcr.io/cyb3r-jak3/pypy-flask-cache:${{ matrix.bake-target }}-${{ matrix.flask }}-${{ matrix.gunicorn }}-${{ matrix.gevent }} | |
Bake_Latest: | |
needs: matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
bake-target: ['slim', 'alpine'] | |
steps: | |
- name: Login to my JFrog Artifactory | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.ARTIFACTORY_USER }} | |
password: ${{ secrets.ARTIFACTORY_TOKEN }} | |
registry: mine.jfrog.cyberjake.xyz | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker | |
uses: docker/login-action@v3 | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
username: ${{ env.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login To GitHub | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Login To GitLab | |
uses: docker/login-action@v3 | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
registry: registry.gitlab.com | |
username: ${{ env.GITLAB_USER }} | |
password: ${{ secrets.GITLAB_TOKEN }} | |
- name: Docker Meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
flavor: | | |
latest=false | |
images: cyb3rjak3/pypy-flask,ghcr.io/cyb3r-jak3/pypy-flask,registry.gitlab.com/cyb3r-jak3/pypy-flask,mine.jfrog.cyberjake.xyz/pypy-flask | |
tags: | | |
type=raw,value=${{ matrix.bake-target }} | |
labels: | | |
org.label-schema.vcs-url=https://github.com/Cyb3r-Jak3/pypy-flask.git | |
org.label-schema.schema-version=1.0.0-rc1 | |
maintainer=Cyb3r Jak3 git@cyberjake.xyz | |
org.opencontainers.image.vendor=cyb3rjak3 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
uses: docker/bake-action@v5 | |
with: | |
files: | | |
./docker-bake.hcl | |
${{ steps.meta.outputs.bake-file }} | |
targets: ${{ matrix.bake-target }}-release | |
push: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
pull: true | |
provenance: true | |
sbom: true | |
set: | | |
${{ matrix.bake-target }}-release.cache-from=ghcr.io/cyb3r-jak3/pypy-flask-cache:${{ matrix.bake-target }} | |
${{ matrix.bake-target }}-release.cache-to=type=registry,mode=max,ref=ghcr.io/cyb3r-jak3/pypy-flask-cache:${{ matrix.bake-target }} |