mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-09 21:16:26 +08:00
Make sure the deploy job uses the latest commit when assets are updated
This commit is contained in:
parent
e7f8cb7e9a
commit
5213b732b9
1 changed files with 9 additions and 2 deletions
11
.github/workflows/deploy.yaml
vendored
11
.github/workflows/deploy.yaml
vendored
|
@ -7,6 +7,8 @@ on:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
jobs:
|
jobs:
|
||||||
assets:
|
assets:
|
||||||
|
outputs:
|
||||||
|
sha: ${{ steps.push_assets.outputs.commit_hash }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -44,17 +46,22 @@ jobs:
|
||||||
run: npm ci --prefix assets
|
run: npm ci --prefix assets
|
||||||
- name: Build assets
|
- name: Build assets
|
||||||
run: npm run deploy --prefix assets
|
run: npm run deploy --prefix assets
|
||||||
- name: Update assets
|
- name: Push updated assets
|
||||||
|
id: push_assets
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
commit_message: Update assets
|
commit_message: Update assets
|
||||||
file_pattern: static
|
file_pattern: static
|
||||||
docker:
|
docker:
|
||||||
# The assets job may push new commit, so we wait for it
|
# The assets job may push new commit, so we wait for it
|
||||||
needs: assets
|
needs: [assets]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# The output is set only if there was a commit, otherwise
|
||||||
|
# we pass an empty ref and and the default is used
|
||||||
|
ref: ${{ needs.assets.outputs.sha }}
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
|
Loading…
Add table
Reference in a new issue