From 76ab51e42e0c4099530918dab29f5a723298802a Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Tue, 13 Feb 2024 22:12:37 +0100 Subject: [PATCH] Copied bin to expected file by Dockerfile --- .github/actions/build/binaries/action.yml | 8 +------- .github/actions/build/docker/action.yml | 17 ++++++++++++----- .github/actions/test/binaries/action.yml | 3 +-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/actions/build/binaries/action.yml b/.github/actions/build/binaries/action.yml index b7fbecf6..2009f904 100644 --- a/.github/actions/build/binaries/action.yml +++ b/.github/actions/build/binaries/action.yml @@ -19,9 +19,7 @@ inputs: golang_version: required: false description: Define the version of golang to compile with - default: 1.18.1 - - + default: 1.21.3 runs: using: "composite" @@ -32,7 +30,6 @@ runs: with: fetch-depth: 2 - ########################### Install go to env ########################### - name: Set up Go uses: actions/setup-go@v5.0.0 @@ -41,13 +38,11 @@ runs: - run: go version shell: bash - ########################### Get GO deps ############################# - name: Get GO deps run: go mod download shell: bash - ########################### Build osctrl inputs.osctrl_component ########################### - name: Build osctrl component run: | @@ -56,7 +51,6 @@ runs: ./${{ inputs.osctrl_component }} shell: bash - ########################### Upload artifacts ########################### - name: Upload osctrl binaries uses: actions/upload-artifact@v4.3.1 diff --git a/.github/actions/build/docker/action.yml b/.github/actions/build/docker/action.yml index ffc62fe8..1a2233dd 100644 --- a/.github/actions/build/docker/action.yml +++ b/.github/actions/build/docker/action.yml @@ -18,20 +18,19 @@ inputs: description: Define the Docker tag docker_hub_org: required: true - description: Pass DockerHub org to aciton + description: Pass DockerHub org to action docker_hub_username: required: true - description: Pass DockerHub username to aciton + description: Pass DockerHub username to action docker_hub_access_token: required: true - description: Pass DockerHub access token to aciton + description: Pass DockerHub access token to action outputs: docker_image_digest: description: Dockerhub image digest value: ${{ toJson(steps.docker_build.outputs.digest) }} - runs: using: "composite" steps: @@ -42,11 +41,19 @@ runs: fetch-depth: 2 ########################### Download osctrl binary ########################### - - name: Download a osctrl binaries + - name: Download osctrl binary uses: actions/download-artifact@v4.1.2 with: name: osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin + ########################### Copy binary to prepare for Docker ########################### + - name: Copy binary to prepare for Docker + shell: bash + run: | + cp \ + osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin \ + osctrl-${{ inputs.osctrl_component }}-${{ inputs.go_os }}-${{ inputs.go_arch }}.bin + ########################### Log into Dockerhub ########################### - name: Login to Docker Hub uses: docker/login-action@v3.0.0 diff --git a/.github/actions/test/binaries/action.yml b/.github/actions/test/binaries/action.yml index 2d587405..367aa197 100644 --- a/.github/actions/test/binaries/action.yml +++ b/.github/actions/test/binaries/action.yml @@ -19,8 +19,7 @@ inputs: golang_version: required: false description: Define the version of golang to compile with - default: 1.18.1 - + default: 1.21.3 runs: using: "composite"