Skip to content

Commit

Permalink
fix: Update registry and release version inputs (#646)
Browse files Browse the repository at this point in the history
Signed-off-by: Heba Elayoty <[email protected]>
  • Loading branch information
helayoty authored Aug 13, 2024
1 parent 96f9099 commit 6086fb0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ jobs:
publish-images:
runs-on: ubuntu-latest
steps:
- name: Login to ${{ github.event.client_payload.registry }}
- name: Login to ${{ inputs.registry }}
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ github.event.client_payload.registry }}
registry: ${{ inputs.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set Image tag
run: |
ver=${{ github.event.client_payload.release_version }}
ver=${{ inputs.release_version }}
echo "IMG_TAG=${ver#"v"}" >> $GITHUB_ENV
- name: Build and push image
run: |
OUTPUT_TYPE=type=registry make docker-build-image
env:
VERSION: ${{ env.IMG_TAG }}
REGISTRY: ${{ github.event.client_payload.registry }}
REGISTRY: ${{ inputs.registry }}

- name: Scan ${{ github.event.client_payload.registry }}/${{ env.IMAGE_NAME }}:${{ env.IMG_TAG }}
- name: Scan ${{ inputs.registry }}/${{ env.IMAGE_NAME }}:${{ env.IMG_TAG }}
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ github.event.client_payload.registry }}/${{ env.IMAGE_NAME }}:${{ env.IMG_TAG }}"
image-ref: "${{ inputs.registry }}/${{ env.IMAGE_NAME }}:${{ env.IMG_TAG }}"
format: 'table'
exit-code: '1'
ignore-unfixed: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-init-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,28 @@ jobs:
fetch-depth: 0
ref: ${{ steps.get-tag.outputs.tag }}

- name: Login to ${{ github.event.client_payload.registry }}
- name: Login to ${{ inputs.registry }}
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ github.event.client_payload.registry }}
registry: ${{ inputs.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set Image tag
run: |
ver=${{ steps.get-tag.outputs.tag }}
ver=${{ inputs.init_container_version }}
echo "INIT_IMG_TAG=${ver#"v"}" >> $GITHUB_ENV
- name: Build and push image
run: |
OUTPUT_TYPE=type=registry make docker-build-init-image
env:
INIT_IMG_TAG: ${{ env.INIT_IMG_TAG }}
REGISTRY: ${{ github.event.client_payload.registry }}
REGISTRY: ${{ inputs.registry }}

- name: Scan ${{ github.event.client_payload.registry }}/${{ env.INIT_IMAGE_NAME }}:${{ env.INIT_IMG_TAG }}
- name: Scan ${{ inputs.registry }}/${{ env.INIT_IMAGE_NAME }}:${{ env.INIT_IMG_TAG }}
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ github.event.client_payload.registry }}/${{ env.INIT_IMAGE_NAME }}:${{ env.INIT_IMG_TAG }}"
image-ref: "${{ inputs.registry }}/${{ env.INIT_IMAGE_NAME }}:${{ env.INIT_IMG_TAG }}"
format: 'table'
exit-code: '1'
ignore-unfixed: true
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TEST_CREDENTIALS_JSON ?= $(TEST_CREDENTIALS_DIR)/credentials.json
TEST_LOGANALYTICS_JSON ?= $(TEST_CREDENTIALS_DIR)/loganalytics.json
export TEST_CREDENTIALS_JSON TEST_LOGANALYTICS_JSON TEST_AKS_CREDENTIALS_JSON

VERSION ?= v1.6.2
VERSION ?= v1.6.1
REGISTRY ?= ghcr.io
IMG_NAME ?= virtual-kubelet
INIT_IMG_NAME ?= init-validation
Expand All @@ -35,7 +35,7 @@ E2E_CLUSTER_NAME := $(CLUSTER_NAME)
OUTPUT_TYPE ?= type=docker
BUILDPLATFORM ?= linux/amd64
IMG_TAG ?= $(subst v,,$(VERSION))
INIT_IMG_TAG ?= v0.3.0
INIT_IMG_TAG ?= v0.2.0

BUILD_DATE ?= $(shell date '+%Y-%m-%dT%H:%M:%S')
VERSION_FLAGS := "-ldflags=-X main.buildVersion=$(IMG_TAG) -X main.buildTime=$(BUILD_DATE)"
Expand Down

0 comments on commit 6086fb0

Please sign in to comment.