Skip to content

Commit ee0bddc

Browse files
committed
Update CI to address depreaction warnings
1 parent 3043c97 commit ee0bddc

File tree

4 files changed

+33
-27
lines changed

4 files changed

+33
-27
lines changed

.github/actions/amazon-linux-build-action/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
cd cmd/tegola_lambda
2020

2121
# build the binary
22-
go build \
22+
GOARCH=${GOARCH} go build \
2323
-mod vendor \
2424
-tags lambda.norpc \
2525
-ldflags "-w -X ${BuildPkg}.Version=${VERSION} -X ${BuildPkg}.GitRevision=${GIT_REVISION} -X ${BuildPkg}.GitBranch=${GIT_BRANCH}" \

.github/actions/tegola-upload-path/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ runs:
2525
shell: bash
2626

2727
- id: compute-path
28-
run: echo "::set-output name=dir-path::${TEGOLA_PATH}"
28+
run: echo "dir-path=${TEGOLA_PATH}" >> $GITHUB_OUTPUT
2929
shell: bash

.github/actions/upload-artifact/action.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ name: upload artifact
22
description: "upload generated artifacts including release"
33
inputs:
44
artifact_name:
5-
description: "name of the artifact"
5+
description: "name of the binary to archive and upload"
66
default: "tegola"
77
required: false
8-
upload_postfix:
9-
description: "uploaded name of the artifact"
10-
default: "linux_amd64"
8+
cmd_subdir:
9+
description: "the subdirectory under cmd/ the built artifact resides (tegola or tegola_lambda)"
10+
default: "tegola"
11+
required: false
12+
release_archive_name:
13+
description: "name of the final archive to upload (excluding the .zip extension)"
14+
default: "tegola_linux_amd64"
1115
required: false
1216
github_token:
1317
description: "github token"
@@ -19,29 +23,29 @@ runs:
1923
- id: zip-path
2024
uses: ./.github/actions/tegola-upload-path
2125
with:
22-
name: ${{ inputs.artifact_name }}
26+
name: ${{ inputs.cmd_subdir }}
2327

2428
# workaround for archives losing permissions
2529
# https://github.com/actions/upload-artifact/issues/38
2630
- name: Zip (not windows)
31+
if: ${{ runner.os != 'Windows' }}
2732
run: |
28-
cd ${{steps.zip-path.outputs.dir-path}}
29-
zip -9 -D tegola.zip ${{inputs.artifact_name}}
33+
cd ${{ steps.zip-path.outputs.dir-path }}
34+
zip -9 -D tegola.zip ${{ inputs.artifact_name }}
3035
shell: bash
31-
if: ${{ runner.os != 'Windows' }}
3236

3337
- name: Zip (windows)
38+
if: ${{ runner.os == 'Windows' }}
3439
run: |
35-
cd ${{steps.zip-path.outputs.dir-path}}
36-
7z a tegola.zip ${{inputs.artifact_name}}.exe
40+
cd ${{ steps.zip-path.outputs.dir-path }}
41+
7z a tegola.zip ${{ inputs.artifact_name }}.exe
3742
shell: pwsh
38-
if: ${{ runner.os == 'Windows' }}
3943

4044
- name: Upload build artifacts
4145
uses: actions/upload-artifact@v3
4246
with:
43-
name: ${{inputs.artifact_name}}${{inputs.upload_postfix}}
44-
path: ${{steps.zip-path.outputs.dir-path}}tegola.zip
47+
name: ${{ inputs.release_archive_name }}
48+
path: ${{ steps.zip-path.outputs.dir-path }}tegola.zip
4549

4650
- name: Upload release asset
4751
if: github.event_name == 'release'
@@ -50,6 +54,6 @@ runs:
5054
GITHUB_TOKEN: ${{ inputs.github_token }}
5155
with:
5256
upload_url: ${{ github.event.release.upload_url }}
53-
asset_path: ${{steps.zip-path.outputs.dir-path}}tegola.zip
54-
asset_name: ${{inputs.artifact_name}}${{inputs.upload_postfix}}.zip
57+
asset_path: ${{ steps.zip-path.outputs.dir-path }}tegola.zip
58+
asset_name: ${{ inputs.release_archive_name }}.zip
5559
asset_content_type: application/zip

.github/workflows/on_release_publish.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
with:
9898
github_token: ${{ secrets.GITHUB_TOKEN }}
9999
artifact_name: "tegola"
100-
upload_postfix: "_linux_amd64"
100+
release_archive_name: "tegola_linux_amd64"
101101

102102
build_linux_arm:
103103
name: Build for Linux (arm64)
@@ -127,11 +127,11 @@ jobs:
127127
with:
128128
github_token: ${{ secrets.GITHUB_TOKEN }}
129129
artifact_name: "tegola"
130-
upload_postfix: "_linux_arm64"
130+
release_archive_name: "tegola_linux_arm64"
131131

132132
build_tegola_lambda_amd64:
133-
name: Build tegola_lambda on Amazon Linux
134-
needs: [gen_version]
133+
name: Build tegola_lambda on Amazon Linux (amd64)
134+
needs: [gen_version,build_ui]
135135
runs-on: ubuntu-22.04
136136

137137
steps:
@@ -156,11 +156,12 @@ jobs:
156156
with:
157157
github_token: ${{ secrets.GITHUB_TOKEN }}
158158
artifact_name: "bootstrap"
159-
upload_postfix: "_amd64"
159+
cmd_subdir: "tegola_lambda"
160+
release_archive_name: "tegola_lambda_amd64"
160161

161162
build_tegola_lambda_arm64:
162-
name: Build tegola_lambda on Amazon Linux
163-
needs: [gen_version]
163+
name: Build tegola_lambda on Amazon Linux (arm64)
164+
needs: [gen_version,build_ui]
164165
runs-on: ubuntu-22.04
165166

166167
steps:
@@ -185,7 +186,8 @@ jobs:
185186
with:
186187
github_token: ${{ secrets.GITHUB_TOKEN }}
187188
artifact_name: "bootstrap"
188-
upload_postfix: "_arm64"
189+
cmd_subdir: "tegola_lambda"
190+
release_archive_name: "tegola_lambda_arm64"
189191

190192
build_macos:
191193
name: Build for MacOS
@@ -213,7 +215,7 @@ jobs:
213215
with:
214216
github_token: ${{ secrets.GITHUB_TOKEN }}
215217
artifact_name: "tegola"
216-
upload_postfix: "_darwin_amd64"
218+
release_archive_name: "tegola_darwin_amd64"
217219

218220
build_docker:
219221
name: Build Docker image and publish to Docker Hub
@@ -311,4 +313,4 @@ jobs:
311313
with:
312314
github_token: ${{ secrets.GITHUB_TOKEN }}
313315
artifact_name: "tegola"
314-
upload_postfix: "_windows_amd64"
316+
release_archive_name: "tegola_windows_amd64"

0 commit comments

Comments
 (0)