Skip to content

Scratch

Scratch #15

Workflow file for this run

#saved so that I can have a workflow to try out in a branch
name: Scratch
on:
workflow_dispatch:
inputs:
tag:
description: tag
required: true
jobs:
get-short-tag:
id: get-short-tag

Check failure on line 13 in .github/workflows/branch-scratch.yml

View workflow run for this annotation

GitHub Actions / Scratch

Invalid workflow file

The workflow is not valid. .github/workflows/branch-scratch.yml (Line: 13, Col: 5): Unexpected value 'id'
runs-on: ubuntu-latest
steps:
- name: save short tag to environment
run: echo "short_tag=$(echo ${{ github.event.inputs.tag }} | head -c 8 )" >> $GITHUB_ENV
- name: echo env var
run: echo "${{ github.env.short_tag }}"
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: 'ghcr.io/mlibrary/lauth/db-builder:${{ github.sha }}, ghcr.io/mlibrary/lauth/db-builder:latest'
file: db/Dockerfile
target: production
platforms: linux/amd64, linux/arm64
- name: Image digest
run: |
echo '${{ steps.docker_build.outputs.digest }}'