Skip to content

Commit ae47bf4

Browse files
authored
Merge pull request #28 from dihm/workflow_tweak
Ensures workflow only runs on tag creation or pull requests, instead of every creation event
2 parents c054589 + 8feb0cc commit ae47bf4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build firmware
22

33
on:
4-
create:
4+
push:
55
tags:
66
- '[0-9]+\.[0-9]+\.[0-9]+*'
77
pull_request:
@@ -13,7 +13,7 @@ jobs:
1313
name: Build firmware
1414
steps:
1515
- name: Check out this repository
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717

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

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

0 commit comments

Comments
 (0)