Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Add basic release workflows for main, stg, and prod acorn images
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Hale <[email protected]>
  • Loading branch information
njhale committed Apr 28, 2023
1 parent 8064268 commit 724ee7f
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release-main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: release-main
on:
push:
branches:
- main

jobs:
build-and-push-main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: acorn-io/actions-setup@v2
with:
acorn-version: main
- uses: acorn-io/actions-login@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
run: |
acorn build --push -t ghcr.io/${{ github.repository }}:main .
18 changes: 18 additions & 0 deletions .github/workflows/release-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: release-prod

on:
workflow_dispatch:

jobs:
copy-stg-to-prod:
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c
- name: Copy Stg to Prod
run: |
crane tag ghcr.io/${{ github.repository }}:stg prod
20 changes: 20 additions & 0 deletions .github/workflows/release-stg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: release-stg

on:
workflow_dispatch:
schedule:
- cron: '00 10 * * *' # time in UTC

jobs:
copy-main-to-stg:
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c
- name: Copy Main to Stg
run: |
crane tag ghcr.io/${{ github.repository }}:main stg
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
push:
runs-on: buildjet-4vcpu-ubuntu-2004
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: acorn-io/actions-setup@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
test:
runs-on: buildjet-4vcpu-ubuntu-2004
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand Down

0 comments on commit 724ee7f

Please sign in to comment.