Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- '*'
pull_request:

permissions: read-all

jobs:
build:
name: ${{ matrix.os }}${{ matrix.arch }} - Python ${{ matrix.version }} - Build wheel
Expand Down Expand Up @@ -125,6 +127,9 @@ jobs:
name: Build & Push Docker images
needs: [ build, tests ]
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
permissions:
contents: read
packages: write
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -207,7 +212,7 @@ jobs:

- name: Build latest
if: github.event_name != 'push'
uses: docker/build-push-action@master
uses: docker/build-push-action@v6
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
Expand Down Expand Up @@ -244,7 +249,7 @@ jobs:

- name: Build and push latest
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags') && github.ref == 'refs/heads/dev'
uses: docker/build-push-action@master
uses: docker/build-push-action@v6
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -258,7 +263,7 @@ jobs:

- name: Build and push staging
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: docker/build-push-action@master
uses: docker/build-push-action@v6
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -272,7 +277,7 @@ jobs:

- name: Build and push on tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: docker/build-push-action@master
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
Expand Down Expand Up @@ -519,6 +524,8 @@ jobs:
name: Create Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [ binary, docker, tentacles ]
permissions:
contents: write
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down