Skip to content

Add GitHub Actions to map the existing GitLab CI/CD config #7

Add GitHub Actions to map the existing GitLab CI/CD config

Add GitHub Actions to map the existing GitLab CI/CD config #7

Workflow file for this run

# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "CI"
on: [push, pull_request]
jobs:
build-dev-image:
runs-on: ubuntu-22.04
env:
IMAGE: "${{ vars.image_registry }}"
IMAGE_TAG: "${{ github.sha }}"
BUILDIMAGE: "${{ vars.image_registry }}/build:${{ github.sha }}"
steps:
- name: build-dev-image
run: |
apk --no-cache add make bash
make .build-image
docker login -u "${{ vars.image_registry_user }}" -p "${{ secrets.image_registry_password }}" "${{ vars.image_registry }}"
make .push-build-image
- name: return-image-name
run: echo "image=${BUILDIMAGE}" >> "${GITHUB_OUTPUT}"
outputs:
image: ${{ steps.return-image-name.outputs.image }}
go-checks:
needs: build-dev-image
runs:

Check failure on line 38 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yaml (Line: 38, Col: 5): Unexpected value 'runs' .github/workflows/ci.yaml (Line: 37, Col: 5): Required property is missing: runs-on
using: docker
image: ${{needs.build-dev-image.outputs.image}}
steps:
- name: fmt
run: make assert-fmt
- name: vet
run: make vet
- name: lint
run: make lint
- name: ineffassign
run: make ineffassign
- name: misspell
run: make misspell
go-build:
needs: go-checks
runs:
using: docker
image: ${{needs.build-dev-image.outputs.image}}
steps:
- name: build
run: make build
unit-tests:
needs: go-build
runs:
using: docker
image: ${{needs.build-dev-image.outputs.image}}
steps:
- name: unit-tests
run: make test