Skip to content

Commit

Permalink
build: call docker workflow after each release step (#1516)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Sep 16, 2023
1 parent 9940fdb commit 2b585af
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
name: Docker

on:
push:
branches:
- main
tags:
# only target a single package tag to avoid running this task for every package on a version release
# in the metadata step, we parse out the specific version used in the tag (e.g. `2.0.0-next.5` and `next`)
- "@latticexyz/common@*"
workflow_call:
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -37,6 +31,7 @@ jobs:
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
# If this doesn't tag properly within the context of `workflow_call`, try `context: git`
images: ${{ matrix.image }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Check for pre.json file existence
id: check_files
uses: andstor/[email protected]
Expand All @@ -47,10 +47,13 @@ jobs:
run: npx changeset pre enter next

- name: Create next version PR or publish 🚀
uses: changesets/action@v1
uses: changesets/action@v1
with:
version: pnpm release:version
publish: pnpm release:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docker:
uses: ./.github/workflows/docker.yml
needs: prerelease
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: "Setup"
uses: ./.github/actions/setup

- name: Clean
shell: bash
run: pnpm turbo run clean --force --concurrency 10
Expand Down Expand Up @@ -60,3 +60,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

docker:
uses: ./.github/workflows/docker.yml
needs: version
4 changes: 4 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

docker:
uses: ./.github/workflows/docker.yml
needs: release-snapshot

0 comments on commit 2b585af

Please sign in to comment.