Skip to content

Commit 0532e82

Browse files
committed
Update GH workflows to latest
1 parent bb3d22a commit 0532e82

File tree

3 files changed

+29
-24
lines changed

3 files changed

+29
-24
lines changed

.github/workflows/build-push.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Panubo build and push to Quay.io and ECR Public
1+
# Source: https://github.com/panubo/reference-github-actions/blob/main/docker-images/build-push.yml
2+
#
3+
# Description: Panubo build and push to Quay.io and ECR Public
24
# This GH Action is intended for public docker images that package upstream applications/services (ie not for projects of Panubo's).
35
# For repos that build multiple repos use the multi-build-push.yml workflow.
46
#
@@ -9,6 +11,8 @@
911
# Automated testing is triggered by `make _ci_test`, if no test is required the Makefile target should just run `true`.
1012
# Before tests are run a Docker build is performed, the resulting image has a tag of "test"
1113
# BATS is installed since it is commonly required by the tests.
14+
#
15+
# LICENSE: MIT License, Copyright (c) 2021-2025 Volt Grid Pty Ltd t/a Panubo
1216

1317
name: build and push on main and tags
1418

@@ -33,7 +37,7 @@ jobs:
3337
runs-on: ubuntu-latest
3438
steps:
3539
- name: Checkout
36-
uses: actions/checkout@v3
40+
uses: actions/checkout@v5
3741

3842
- name: Get repo name
3943
id: image_name
@@ -42,7 +46,7 @@ jobs:
4246
4347
- name: Docker meta
4448
id: meta
45-
uses: docker/metadata-action@v4
49+
uses: docker/metadata-action@v5
4650
with:
4751
# list of Docker images to use as base name for tags
4852
images: |
@@ -59,28 +63,28 @@ jobs:
5963
# type=sha
6064
6165
- name: Set up QEMU
62-
uses: docker/setup-qemu-action@v2
66+
uses: docker/setup-qemu-action@v3
6367

6468
- name: Set up Docker Buildx
6569
id: buildx
66-
uses: docker/setup-buildx-action@v2
70+
uses: docker/setup-buildx-action@v3
6771

6872
# The values provided to these two AWS steps are always the same for Panubo owned repos
6973
- name: Configure AWS Credentials
70-
uses: aws-actions/configure-aws-credentials@v1-node16
74+
uses: aws-actions/configure-aws-credentials@v4
7175
with:
7276
role-to-assume: ${{ env.GITHUB_ROLE_ARN }}
7377
aws-region: us-east-1
7478

7579
- name: Login to ECR
7680
if: github.event_name != 'pull_request'
77-
uses: docker/login-action@v2
81+
uses: docker/login-action@v3
7882
with:
7983
registry: public.ecr.aws
8084

8185
- name: Login to Quay.io
8286
if: github.event_name != 'pull_request'
83-
uses: docker/login-action@v2
87+
uses: docker/login-action@v3
8488
with:
8589
registry: quay.io
8690
username: ${{ secrets.PANUBUILD_QUAYIO_USERNAME }}
@@ -92,7 +96,7 @@ jobs:
9296
bats-version: 1.7.0
9397

9498
- name: Build and export to Docker
95-
uses: docker/build-push-action@v4
99+
uses: docker/build-push-action@v6
96100
with:
97101
builder: ${{ steps.buildx.outputs.name }}
98102
cache-from: type=gha
@@ -104,7 +108,7 @@ jobs:
104108
make _ci_test
105109
106110
- name: Build and Push
107-
uses: docker/build-push-action@v3
111+
uses: docker/build-push-action@v6
108112
with:
109113
builder: ${{ steps.buildx.outputs.name }}
110114
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/release.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
# Source: https://github.com/panubo/reference-github-actions/blob/master/github-release.yml
1+
# Source: https://github.com/panubo/reference-github-actions/blob/main/github-release.yml
2+
# Description: Create a GitHub release
3+
# LICENSE: MIT License, Copyright (c) 2021-2025 Volt Grid Pty Ltd t/a Panubo
4+
5+
name: GitHub Release
26

37
on:
48
push:
59
tags:
6-
- '*'
10+
- "v*"
11+
workflow_call:
712

8-
name: GitHub Release
13+
permissions:
14+
contents: write
915

1016
jobs:
1117
build:
1218
name: Create GitHub Release
1319
runs-on: ubuntu-latest
1420
steps:
15-
1621
- name: Checkout code
17-
uses: actions/checkout@v2
22+
uses: actions/checkout@v5
1823
with:
19-
fetch-depth: 0
24+
fetch-depth: 0 # Required for git log to work
2025

2126
- name: Get Release Notes
2227
id: get_release_notes
2328
run: |
24-
NOTES=$(git log --pretty=format:%s $(git tag --sort=-refname | head -1)...$(git tag --sort=-refname | head -2 | tail -1) | awk '{ print "-", $0 }')
25-
NOTES="${NOTES//'%'/'%25'}"
26-
NOTES="${NOTES//$'\n'/'%0A'}"
27-
NOTES="${NOTES//$'\r'/'%0D'}"
28-
echo "NOTES: ${NOTES}"
29-
echo "::set-output name=notes::${NOTES}"
29+
NOTES=$(git log --pretty=format:%s $(git tag --sort=-v:refname | head -1)...$(git tag --sort=-v:refname | head -2 | tail -1) | awk '{ print "-", $0 }')
30+
printf "notes<<EOF\\n%s\\nEOF\\n" "${NOTES}" >> "$GITHUB_OUTPUT"
3031
3132
- name: Create Release
3233
id: create_release
@@ -41,5 +42,5 @@ jobs:
4142
4243
${{ steps.get_release_notes.outputs.notes }}
4344
44-
draft: true
45+
draft: false
4546
prerelease: false

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
steps:
1111

1212
- name: Checkout code
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0
1616

0 commit comments

Comments
 (0)