Skip to content

Commit

Permalink
Fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsauter committed Sep 29, 2023
1 parent d7df093 commit ddb79d8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ on:
- released

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_BASE: ${{ github.repository }}
IMAGE_NAME: sonar-scan
IMAGE_NAME: scan

jobs:
build:
Expand All @@ -23,11 +21,11 @@ jobs:
name: Create image tag
run: |
IMAGE_TAG=$(echo ${{ github.event.release.tag_name }} | sed 's/v//')
echo "{imageTag}={$IMAGE_TAG}" >> $GITHUB_OUTPUT
echo "imageTag=$IMAGE_TAG" >> $GITHUB_OUTPUT
- id: createImageBase
run: |
echo "{imageBase}={${IMAGE_BASE,,}}" >> $GITHUB_OUTPUT
echo "imageBase=${IMAGE_BASE,,}" >> $GITHUB_OUTPUT
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -46,4 +44,4 @@ jobs:
context: .
file: build/images/Dockerfile.${{env.IMAGE_NAME}}
push: true
tags: ${{env.REGISTRY}}/${{steps.createImageBase.outputs.imageBase}}/${{env.IMAGE_NAME}}:${{ outputs.imageTag }}
tags: ${{env.REGISTRY}}/${{steps.createImageBase.outputs.imageBase}}/${{env.IMAGE_NAME}}:${{steps.createImageTag.outputs.imageTag}}
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ SHELL = /bin/bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules

# Variables
VERSION?=latest

##@ General

# help target is based on https://github.com/operator-framework/operator-sdk/blob/master/release/Makefile.
Expand All @@ -32,7 +29,7 @@ image-scan: ## Build scan image.
tasks: ## Render tasks. Use "VERSION=1.0.0 make tasks" to render a specific version.
go run github.com/opendevstack/ods-pipeline/cmd/taskmanifest \
-data ImageRepository=ghcr.io/opendevstack/ods-pipeline-sonar \
-data Version=$(VERSION) \
-data Version=$$(cat version) \
-template build/tasks/scan.yaml \
-destination tasks/scan.yaml
.PHONY: tasks
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ods-pipeline-sonar

[![Tests](https://github.com/opendevstack/ods-pipeline-sonar/actions/workflows/main.yaml/badge.svg)](https://github.com/opendevstack/ods-pipeline-sonar/actions/workflows/main.yaml)

Tekton task for use with [ODS Pipeline](https://github.com/opendevstack/ods-pipeline) to run the SonarQube scanner.

## Usage
Expand Down
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
latest

0 comments on commit ddb79d8

Please sign in to comment.