Skip to content

Commit

Permalink
Merge pull request #28 from dihm/workflow_tweak
Browse files Browse the repository at this point in the history
Ensures workflow only runs on tag creation or pull requests, instead of every creation event
  • Loading branch information
dihm committed May 21, 2024
2 parents c054589 + 8feb0cc commit ae47bf4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build firmware

on:
create:
push:
tags:
- '[0-9]+\.[0-9]+\.[0-9]+*'
pull_request:
Expand All @@ -13,7 +13,7 @@ jobs:
name: Build firmware
steps:
- name: Check out this repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build Docker image
run: docker compose build --pull --build-arg APT_MIRROR="http://azure.archive.ubuntu.com/ubuntu/"
Expand All @@ -28,7 +28,7 @@ jobs:
path: build/prawnblaster/*.uf2

- name: Create release
if: ${{ github.event.ref_type == 'tag' }}
if: (github.event_name == 'push' && contains(github.ref, '/tags'))
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down

0 comments on commit ae47bf4

Please sign in to comment.