Add Farmhand and Cobrashare icons to Quick Info #121
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: build ui | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_call: | |
outputs: | |
image_tag: | |
description: "The tag for all images in this run" | |
value: ${{ jobs.setup.outputs.version }} | |
inputs: | |
push: | |
type: boolean | |
description: "Whether or not to push the image to the registry" | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.VERSION }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get commit hash | |
id: version | |
run: echo "VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
build: | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set image tag | |
id: image_tag | |
run: echo "value=${{ secrets.DO_REGISTRY }}/${{ vars.UI_IMAGE }}:${{ needs.setup.outputs.version }}" >> $GITHUB_OUTPUT | |
- name: Install doctl | |
uses: digitalocean/action-doctl@v2 | |
with: | |
token: ${{ secrets.DO_REGISTRY_KEY }} | |
- name: Log in to DO Container Registry | |
run: doctl registry login --expiry-seconds 600 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push UI image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Dockerfile | |
push: ${{ inputs.push || false }} | |
platforms: linux/amd64 | |
tags: | | |
${{ steps.image_tag.outputs.value }} | |
cache-from: type=registry,ref=${{ secrets.DO_REGISTRY }}/${{ vars.UI_IMAGE }}:buildcache | |
cache-to: type=registry,ref=${{ secrets.DO_REGISTRY }}/${{ vars.UI_IMAGE }}:buildcache,mode=max | |
- name: Image digest | |
run: echo "UI image digest $(doctl registry repository digest-list ${{ vars.UI_IMAGE }} --format Tag,Digest --no-header | grep ${{ needs.setup.outputs.version }})" |