Changes CI config to GitHub Actions

This commit is contained in:
Maximilian Kratz 2023-01-29 12:54:10 +01:00
parent a2148e89e2
commit 8274d8d25c
3 changed files with 32 additions and 17 deletions

View file

@ -1,16 +0,0 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
repo: maxkratz/python-custom
tags: 3.6
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
when:
branch:
- main

31
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: Build Docker images
on:
push:
branches:
- 'main'
- 'testing/**'
- 'feature/**'
- 'hotfix/**'
jobs:
build-latest:
runs-on: [ubuntu-22.04]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build latest
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/heads/main') && github.event_name != 'schedule' }}
tags: maxkratz/python-custom:latest
platforms: linux/amd64

View file

@ -1,6 +1,6 @@
# docker_python-custom
[![Build Status](https://github.ci.maxkratz.com/api/badges/maxkratz/docker_python-custom/status.svg?ref=refs/heads/main)](https://github.ci.maxkratz.com/maxkratz/docker_python-custom)
[![Build Docker images](https://github.com/maxkratz/docker_python-custom/actions/workflows/build.yml/badge.svg)](https://github.com/maxkratz/docker_python-custom/actions/workflows/build.yml)
*Unofficial* custom python Docker image for faster CI jobs of other projects of mine.
Prebuild images can be found at [Dockerhub](https://hub.docker.com/r/maxkratz/python-custom).