This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
force promotion of new tags to latest #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --force |