Skip to content

Enhance implementation #22

Enhance implementation

Enhance implementation #22

Workflow file for this run

name: static-server
on:
pull_request:
branches: [ main,development ]
push:
tags:
- 'v*'
jobs:
test_and_build:
runs-on: ubuntu-latest
name: Test and Build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Get dependencies
run: go mod download
- name: Test
run: |
go test ./...
# code_quality:
# name: Code Quality🎖️
# runs-on: ubuntu-latest
# container: "golangci/golangci-lint:v1.62.2"
# steps:
# - name: Check out code into the Go module directory
# uses: actions/checkout@v4
# - name: Get dependencies
# run: go get -v -t -d ./...
# - name: GolangCI-Lint
# run: |
# golangci-lint run --timeout 9m0s
release_package:
if: ${{ startsWith(github.ref, 'refs/tags/v')}}
needs: [test_and_build,code_quality]

Check failure on line 42 in .github/workflows/go.yaml

View workflow run for this annotation

GitHub Actions / static-server

Invalid workflow file

The workflow is not valid. .github/workflows/go.yaml (Line: 42, Col: 28): Job 'release_package' depends on unknown job 'code_quality'.
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Get dependencies
run: |
go mod download
- name: Extract Release Tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: "v4vikash"
password: ${{ secrets.DOCKER_HUB_PAT }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
push: true
context: .
file: Dockerfile
tags: zopdev/static-server:${{ env.RELEASE_VERSION }}