Skip to content

Update Dockerfile - pinned digest for base container images (#231) #75

Update Dockerfile - pinned digest for base container images (#231)

Update Dockerfile - pinned digest for base container images (#231) #75

Workflow file for this run

name: ci
on:
# We run the CI checks on any pull request updates or pushes to the main branch after PR merge.
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: 'go.mod'
- name: Run Go Vet
run: go vet ./...
- name: Run Go Tests
run: go test ./... -cover -race
- name: Build binary
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
with:
distribution: goreleaser
version: '~> v2'
args: build --snapshot
- name: Install license check tool
run: go install github.com/google/addlicense@dc31ac9ffcca99c9457226366135701794b128c0
- name: Check licenses
run: addlicense -l apache -check -v -ignore '**/*.yaml' -c Humanitec ./cmd ./internal/
- name: Build docker image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
push: false
load: true
tags: score-compose:test
- name: Test docker image
run: |
docker run --rm score-compose:test --version
docker run -v .:/score-compose --rm score-compose:test init
cat score.yaml