Skip to content

Change CI name

Change CI name #115

Workflow file for this run

name: CI LINUX
on:
push:
branches:
- '*'
- '!main'
tags:
- '*'
env:
DOCKERFILE: Dockerfile-py3-linux
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run Tests
run: |
echo "Building image to test"
./build-and-test.sh ${{ env.DOCKERFILE }}
build_and_push_to_registry:
needs: test
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-linux
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Docker image (branch)
if: github.ref != 'refs/heads/main'
uses: docker/build-push-action@v3
with:
context: .
platforms: |
linux/amd64
linux/arm64
file: ${{ env.DOCKERFILE }}
push: true
tags: |
${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (release)
if: ${{ startsWith(github.ref, 'refs/tags/*') }}
uses: docker/build-push-action@v3
with:
context: .
platforms: |
linux/amd64
linux/arm64
file: ${{ env.DOCKERFILE }}
push: true
tags: |
${{ github.ref_name }}"
${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-linux:latest
labels: ${{ steps.meta.outputs.labels }}