aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ashcon Partovi <ashcon@partovi.net> 2023-02-01 10:42:04 -0800
committerGravatar Ashcon Partovi <ashcon@partovi.net> 2023-02-01 10:42:04 -0800
commita0be199b4fe9acef5ae6c196f13562d10968f9ea (patch)
tree488242c977f3777523ce2fa661fd65b7df492d52
parent73d6c888b9d4a9ac94452253d924f7ccea069429 (diff)
downloadbun-a0be199b4fe9acef5ae6c196f13562d10968f9ea.tar.gz
bun-a0be199b4fe9acef5ae6c196f13562d10968f9ea.tar.zst
bun-a0be199b4fe9acef5ae6c196f13562d10968f9ea.zip
Add morningly workflow to release to canary
-rw-r--r--.github/workflows/bun-release-canary.yml70
-rw-r--r--.github/workflows/bun-release.yml10
2 files changed, 74 insertions, 6 deletions
diff --git a/.github/workflows/bun-release-canary.yml b/.github/workflows/bun-release-canary.yml
new file mode 100644
index 000000000..88a094f2f
--- /dev/null
+++ b/.github/workflows/bun-release-canary.yml
@@ -0,0 +1,70 @@
+name: bun-release-canary
+concurrency: release-canary
+on:
+ schedule:
+ - cron: "0 14 * * *" # every day at 6am PST
+ workflow_dispatch:
+jobs:
+ npm:
+ name: Release to NPM
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: packages/bun-release
+ steps:
+ - id: checkout
+ name: Checkout
+ uses: actions/checkout@v3
+ - id: setup-bun
+ name: Setup Bun
+ uses: oven-sh/setup-bun@v0.1.8
+ with:
+ bun-version: canary
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ - id: bun-install
+ name: Install Dependencies
+ run: bun install
+ - id: bun-run
+ name: Release
+ run: bun upload-npm -- canary publish
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ docker:
+ name: Release to Dockerhub
+ runs-on: ubuntu-latest
+ steps:
+ - id: checkout
+ name: Checkout
+ uses: actions/checkout@v3
+ - id: qemu
+ name: Setup Docker QEMU
+ uses: docker/setup-qemu-action@v2
+ - id: buildx
+ name: Setup Docker buildx
+ uses: docker/setup-buildx-action@v2
+ with:
+ platforms: linux/amd64,linux/arm64
+ - id: metadata
+ name: Setup Docker metadata
+ uses: docker/metadata-action@v4
+ with:
+ images: oven/bun
+ tags: canary
+ - id: login
+ name: Login to Docker
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ - id: push
+ name: Push to Docker
+ uses: docker/build-push-action@v3
+ with:
+ context: ./dockerhub
+ file: ./dockerhub/Dockerfile-debian
+ platforms: linux/amd64,linux/arm64
+ builder: ${{ steps.buildx.outputs.name }}
+ push: true
+ tags: ${{ steps.metadata.outputs.tags }}
+ labels: ${{ steps.metadata.outputs.labels }}
diff --git a/.github/workflows/bun-release.yml b/.github/workflows/bun-release.yml
index b25c0d17b..192a5f072 100644
--- a/.github/workflows/bun-release.yml
+++ b/.github/workflows/bun-release.yml
@@ -9,7 +9,7 @@ on:
tag:
type: string
description: The tag to publish
- default: canary
+ required: true
jobs:
npm:
name: Release to NPM
@@ -26,7 +26,6 @@ jobs:
run: |
TAG="${{ github.event.inputs.tag }}"
TAG="${TAG:-"${{ github.event.release.tag_name }}"}"
- TAG="${TAG:-"canary"}"
echo "Setup tag: ${TAG}"
echo "TAG=${TAG}" >> ${GITHUB_ENV}
- id: setup-bun
@@ -56,7 +55,6 @@ jobs:
run: |
TAG="${{ github.event.inputs.tag }}"
TAG="${TAG:-"${{ github.event.release.tag_name }}"}"
- TAG="${TAG:-"canary"}"
echo "Setup tag: ${TAG}"
echo "TAG=${TAG}" >> ${GITHUB_ENV}
- id: qemu
@@ -73,9 +71,9 @@ jobs:
with:
images: oven/bun
tags: |
- type=match,pattern=(bun-v)?(canary|\d.\d.\d),group=2,value=${{ env.TAG }}
- type=match,pattern=(bun-v)?(canary|\d.\d.\d),group=2,value=${{ env.TAG }}
- type=match,pattern=(bun-v)?(canary|\d.\d.\d),group=2,value=${{ env.TAG }}
+ type=match,pattern=(bun-v)?(\d.\d.\d),group=2,value=${{ env.TAG }}
+ type=match,pattern=(bun-v)?(\d.\d.\d),group=2,value=${{ env.TAG }}
+ type=match,pattern=(bun-v)?(\d.\d.\d),group=2,value=${{ env.TAG }}
- id: login
name: Login to Docker
uses: docker/login-action@v2