Skip to content

ci: Added some checks to workflows #25

ci: Added some checks to workflows

ci: Added some checks to workflows #25

Workflow file for this run

name: Docker Build
on:
pull_request:
branches:
- main
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: "go.mod"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
with:
version: latest
args: build --single-target --clean --output ./version
env:
GORELEASER_CURRENT_TAG: ${{ steps.draft_release.outputs.tag_name }}
- name: Version test
id: version
run:
echo "version=$(./version bump 0.1.0)" >> "$GITHUB_OUTPUT"
- name: Failed
if: ${{ steps.version.outputs.output != "0.1.1" }}

Check failure on line 31 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / Docker Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yaml (Line: 31, Col: 13): Unexpected symbol: '"0'. Located at position 33 within expression: steps.version.outputs.output != "0.1.1" .github/workflows/build.yaml (Line: 35, Col: 13): Unexpected symbol: '"0'. Located at position 33 within expression: steps.version.outputs.output == "0.1.1"
run: |-
exit 1
- name: Success
if: ${{ steps.version.outputs.output == "0.1.1" }}
run: |-
exit 0
docker-build:
name: docker-build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Build Docker image
run: VERSION=$(git rev-parse --short HEAD) make docker-build
- name: Version test
id: version
run:
echo "version=$(docker run ghcr.io/version-cli/version:latest bump 0.1.0)" >> "$GITHUB_OUTPUT"
- name: Failed
if: ${{ steps.version.outputs.output != "0.1.1" }}
run: |-
exit 1
- name: Success
if: ${{ steps.version.outputs.output == "0.1.1" }}
run: |-
exit 0