add on pull request workflow
This commit is contained in:
parent
2cb5d7ba9c
commit
3893a6bd09
2 changed files with 50 additions and 1 deletions
48
.github/workflows/on-pull-request.yml
vendored
Normal file
48
.github/workflows/on-pull-request.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
name: On push
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
paths-ignore:
|
||||||
|
- 'dashboard/*'
|
||||||
|
- 'examples/*'
|
||||||
|
- 'README.md'
|
||||||
|
- 'LICENSE'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_container_image:
|
||||||
|
name: Build and push Docker image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3.8.0
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
ghcr.io/${{ github.repository }}-development
|
||||||
|
tags: |
|
||||||
|
type=raw,value=dev-{{date 'X'}}
|
||||||
|
type=raw,value=latest
|
||||||
|
type=ref,event=branch
|
||||||
|
type=edge,branch=main
|
||||||
|
- name: Build
|
||||||
|
uses: docker/build-push-action@v6.11.0
|
||||||
|
with:
|
||||||
|
platforms: ${{ env.PLATFORMS }}
|
||||||
|
push: false
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
provenance: false
|
||||||
|
|
||||||
|
|
||||||
3
.github/workflows/on-push.yml
vendored
3
.github/workflows/on-push.yml
vendored
|
|
@ -18,6 +18,7 @@ jobs:
|
||||||
build_and_push:
|
build_and_push:
|
||||||
name: Build and push Docker image
|
name: Build and push Docker image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.actor != 'dependabot[bot]' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -25,7 +26,7 @@ jobs:
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.8.0
|
uses: docker/setup-buildx-action@v3.8.0
|
||||||
- name: Login to docker hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3.3.0
|
uses: docker/login-action@v3.3.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue