Skip to content

Commit 933c535

Browse files
committed
Improve release automation
1 parent 0874a94 commit 933c535

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ name: Release
33
on:
44
# This workflow can be manually triggered
55
workflow_dispatch:
6-
# But the main use case is to release new layers when a tag/release is created
7-
push:
8-
tags:
9-
- '*' # On all tags
6+
# But the main use case is to release new layers when a release is created
7+
release:
8+
types: [published]
109

1110
# Necessary to deploy to AWS using OIDC
1211
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
@@ -79,10 +78,15 @@ jobs:
7978
github-token: ${{ secrets.GH_TOKEN_TRIGGER }}
8079
script: |
8180
await github.rest.actions.createWorkflowDispatch({
82-
owner: 'brefphp',
83-
repo: 'bref',
84-
workflow_id: 'update-layer-versions.yml',
85-
ref: 'v2'
81+
owner: 'brefphp',
82+
repo: 'bref',
83+
workflow_id: 'update-layer-versions.yml',
84+
ref: 'v2',
85+
inputs: {
86+
'release_url': '${{ github.event.release.url }}'
87+
'release_html_url': '${{ github.event.release.html_url }}'
88+
'release_name': '${{ github.event.release.name }}'
89+
}
8690
})
8791
8892
update-layer-js-versions:

0 commit comments

Comments
 (0)