Skip to content

chore: template setup #12

chore: template setup

chore: template setup #12

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: "Build and Push Image"
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Short Commit Hash
id: vars
shell: bash
run: |
echo "VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo Build Version: $VERSION
- name: Build Image
run: |

Check failure on line 25 in .github/workflows/deploy.yaml

View workflow run for this annotation

GitHub Actions / Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yaml (Line: 25, Col: 14): Unexpected symbol: 'GITHUB_SHA::7'. Located at position 1 within expression: GITHUB_SHA::7
docker build -t app:${{GITHUB_SHA::7}} \
--build-arg VERSION=${GITHUB_SHA::7} \
.
# Upload Docker image Artifact
# NOTE: This is only for template purposes. You should be pushing the image to an image registry/repository.
# When you use this template, make sure to replace this step with the appropriate step to push the image to your
# image registry/repository.
- name: Upload Docker Image Artifact
uses: actions/upload-artifact@v3
with:
name: app_${GITHUB_SHA::7}
path: app_${GITHUB_SHA::7}.tar