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

Commit

Permalink
Add workflow for publishing image
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Jellick <[email protected]>
  • Loading branch information
cjellick committed Aug 11, 2023
1 parent 3dd1469 commit eab5f8c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish acorn image

on:
push:
tags:
- "v*"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- 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: Set tag
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build and Publish
run: |
acorn build --platform linux/amd64 --platform linux/arm64 --push -t ghcr.io/acorn-io/hello-world:${TAG} .
acorn copy ghcr.io/acorn-io/hello-world:${TAG} ghcr.io/acorn-io/hello-world:latest

0 comments on commit eab5f8c

Please sign in to comment.