Skip to content

fixed path to Dockerfile #9

fixed path to Dockerfile

fixed path to Dockerfile #9

Workflow file for this run

name: CI
env:
GO_VERSION: '1.23'
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, closed]
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: golang:${{ env.GO_VERSION }}-bookworm

Check failure on line 17 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 17, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GO_VERSION .github/workflows/ci.yml (Line: 68, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GO_VERSION
env:
BUILDVCS: false
if: "!contains(github.event.head_commit.message, 'SKIPCI')"
steps:
- uses: actions/checkout@v3
- name: Build
run: |
echo "Building for repository: ${{ github.repository }}"
echo "Building with Go version: ${{ env.GO_VERSION }}"
go build -o bin/findtfvars ./cmd/findtfvars
go build -o bin/tfvars-to-args ./cmd/tfvars-to-args
- name: Test
run: go test ./...
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: tfvars-tools
path: bin/
- name: Update README
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
LATEST_VERSION=$(git describe --tags --abbrev=0)
sed -e "s|{{REPO_NAME}}|${GITHUB_REPOSITORY#*/}|g" \
-e "s|{{REPO_FULL_NAME}}|$GITHUB_REPOSITORY|g" \
-e "s|{{LATEST_VERSION}}|$LATEST_VERSION|g" \
-e "s|{{GO_VERSION}}|${{ env.GO_VERSION }}|g" \
README.template.md > README.md
- name: Commit README
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git diff --quiet && git diff --staged --quiet || git commit -m "Update README.md"
- name: Push changes
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
release:
needs: build-and-test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: golang:${{ env.GO_VERSION }}-bookworm
env:
BUILDVCS: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}