Skip to content

Commit

Permalink
Feature/fix docker ref (#2)
Browse files Browse the repository at this point in the history
* fixing versioning
  • Loading branch information
kingcdavid authored Jan 9, 2024
1 parent 26da84b commit 8f2b60b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)

- name: Set version
run: |
VER=$(cat version.txt)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
Expand All @@ -43,6 +43,7 @@ jobs:
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=raw,value=${{ env.VERSION }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
Expand All @@ -62,12 +63,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: true
prerelease: false
body: |
To install: `kubectl apply -f https://github.com/${{ github.repository_owner }}/atlas-cert-manager/releases/download/${{ steps.get_version.outputs.VERSION }}/install.yaml`
To install: `kubectl apply -f https://github.com/${{ github.repository_owner }}/atlas-cert-manager/releases/download/${{ env.VERSION }}/install.yaml`
- name: Upload Release Asset
id: upload-release-asset
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SHELL := bash

# The version which will be reported by the --version argument of each binary
# and which will be used as the Docker image tag
VERSION ?= latest
VERSION ?= master
# The Docker repository name, overridden in CI.
DOCKER_REGISTRY ?= ghcr.io
GITHUBOWNER ?= globalsign
Expand Down
2 changes: 2 additions & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v0.0.1

0 comments on commit 8f2b60b

Please sign in to comment.