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 420ffa3 commit 679ac7c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +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: node18-npm-toolset

jobs:
build:
Expand All @@ -22,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 @@ -43,6 +42,6 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: build/images/Dockerfile.go-toolset
file: build/images/Dockerfile.${{env.IMAGE_NAME}}
push: true
tags: ${{ env.REGISTRY }}/${{steps.createImageBase.outputs.imageBase}}/go-toolset:${{ 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-node18-npm-toolset: ## Build node18-npm-toolset image.
tasks: ## Render tasks. Use VERSION=1.0.0 make tasks to render specific version.
go run github.com/opendevstack/ods-pipeline/cmd/taskmanifest \
-data ImageRepository=ghcr.io/opendevstack/ods-pipeline-npm \
-data Version=$(VERSION) \
-data Version=$$(cat version) \
-template build/tasks/build.yaml \
-destination tasks/build.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-npm

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

Tekton task for use with [ODS Pipeline](https://github.com/opendevstack/ods-pipeline) to build Go applications.

## 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 679ac7c

Please sign in to comment.