Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/action-buildpack-compute-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@ name: Action buildpack-compute-metadata
"on":
pull_request:
paths:
- .github/workflows/action-buildpack-compute-metadata.yml
- buildpack/compute-metadata/**
- Dockerfile
- go.mod
- go.sum
- internal/**
push:
branches:
- main
- test
paths:
- .github/workflows/action-buildpack-compute-metadata.yml
- buildpack/compute-metadata/**
- Dockerfile
- go.mod
- go.sum
- internal/**
release:
types:
Expand Down Expand Up @@ -58,6 +66,7 @@ jobs:
docker build \
--file Dockerfile \
--build-arg "SOURCE=${SOURCE}" \
--build-arg "GO_VERSION=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" \
--tag "${TARGET}:${VERSION}" \
.
echo "::endgroup::"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/action-buildpackage-verify-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@ name: Action buildpackage-verify-metadata
"on":
pull_request:
paths:
- .github/workflows/action-buildpackage-verify-metadata.yml
- buildpackage/verify-metadata/**
- Dockerfile
- go.mod
- go.sum
- internal/**
push:
branches:
- main
- test
paths:
- .github/workflows/action-buildpackage-verify-metadata.yml
- buildpackage/verify-metadata/**
- Dockerfile
- go.mod
- go.sum
- internal/**
release:
types:
Expand Down Expand Up @@ -58,6 +66,7 @@ jobs:
docker build \
--file Dockerfile \
--build-arg "SOURCE=${SOURCE}" \
--build-arg "GO_VERSION=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" \
--tag "${TARGET}:${VERSION}" \
.
echo "::endgroup::"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/action-registry-add-entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Action registry-add-entry
"on":
pull_request:
paths:
- .github/workflows/action-registry-add-entry.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/add-entry/**
- registry/internal/**
Expand All @@ -10,6 +14,10 @@ name: Action registry-add-entry
- main
- test
paths:
- .github/workflows/action-registry-add-entry.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/add-entry/**
- registry/internal/**
Expand Down Expand Up @@ -60,6 +68,7 @@ jobs:
docker build \
--file Dockerfile \
--build-arg "SOURCE=${SOURCE}" \
--build-arg "GO_VERSION=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" \
--tag "${TARGET}:${VERSION}" \
.
echo "::endgroup::"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/action-registry-compute-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Action registry-compute-metadata
"on":
pull_request:
paths:
- .github/workflows/action-registry-compute-metadata.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/compute-metadata/**
- registry/internal/**
Expand All @@ -10,6 +14,10 @@ name: Action registry-compute-metadata
- main
- test
paths:
- .github/workflows/action-registry-compute-metadata.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/compute-metadata/**
- registry/internal/**
Expand Down Expand Up @@ -60,6 +68,7 @@ jobs:
docker build \
--file Dockerfile \
--build-arg "SOURCE=${SOURCE}" \
--build-arg "GO_VERSION=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" \
--tag "${TARGET}:${VERSION}" \
.
echo "::endgroup::"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/action-registry-request-add-entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Action registry-request-add-entry
"on":
pull_request:
paths:
- .github/workflows/action-registry-request-add-entry.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/internal/**
- registry/request-add-entry/**
Expand All @@ -10,6 +14,10 @@ name: Action registry-request-add-entry
- main
- test
paths:
- .github/workflows/action-registry-request-add-entry.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/internal/**
- registry/request-add-entry/**
Expand Down Expand Up @@ -60,6 +68,7 @@ jobs:
docker build \
--file Dockerfile \
--build-arg "SOURCE=${SOURCE}" \
--build-arg "GO_VERSION=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" \
--tag "${TARGET}:${VERSION}" \
.
echo "::endgroup::"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/action-registry-request-yank-entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Action registry-request-yank-entry
"on":
pull_request:
paths:
- .github/workflows/action-registry-request-yank-entry.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/internal/**
- registry/request-yank-entry/**
Expand All @@ -10,6 +14,10 @@ name: Action registry-request-yank-entry
- main
- test
paths:
- .github/workflows/action-registry-request-yank-entry.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/internal/**
- registry/request-yank-entry/**
Expand Down Expand Up @@ -60,6 +68,7 @@ jobs:
docker build \
--file Dockerfile \
--build-arg "SOURCE=${SOURCE}" \
--build-arg "GO_VERSION=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" \
--tag "${TARGET}:${VERSION}" \
.
echo "::endgroup::"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Action registry-verify-namespace-owner
"on":
pull_request:
paths:
- .github/workflows/action-registry-verify-namespace-owner.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/internal/**
- registry/verify-namespace-owner/**
Expand All @@ -10,6 +14,10 @@ name: Action registry-verify-namespace-owner
- main
- test
paths:
- .github/workflows/action-registry-verify-namespace-owner.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/internal/**
- registry/verify-namespace-owner/**
Expand Down Expand Up @@ -60,6 +68,7 @@ jobs:
docker build \
--file Dockerfile \
--build-arg "SOURCE=${SOURCE}" \
--build-arg "GO_VERSION=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" \
--tag "${TARGET}:${VERSION}" \
.
echo "::endgroup::"
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/action-registry-yank-entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@ name: Action registry-yank-entry
"on":
pull_request:
paths:
- .github/workflows/action-registry-yank-entry.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/yank-entry/**
- registry/internal/**
- registry/yank-entry/**
push:
branches:
- main
- test
paths:
- .github/workflows/action-registry-yank-entry.yml
- Dockerfile
- go.mod
- go.sum
- internal/**
- registry/yank-entry/**
- registry/internal/**
- registry/yank-entry/**
release:
types:
- published
Expand Down Expand Up @@ -60,6 +68,7 @@ jobs:
docker build \
--file Dockerfile \
--build-arg "SOURCE=${SOURCE}" \
--build-arg "GO_VERSION=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" \
--tag "${TARGET}:${VERSION}" \
.
echo "::endgroup::"
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/pb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
path: ${{ env.HOME }}/go/pkg/mod
restore-keys: ${{ runner.os }}-go-
# Uses only the major.minor from `go.mod`, since setup-go would otherwise install the
# exact (and often outdated) patch version in the `go` directive, such as `1.27.0`.
- id: go-version
run: echo "version=$(sed -nE 's/^go ([0-9]+\.[0-9]+).*/\1/p' go.mod)" >> "${GITHUB_OUTPUT}"
- uses: actions/setup-go@v7
with:
go-version: "1.26"
go-version: ${{ steps.go-version.outputs.version }}
check-latest: true
- name: Install richgo
run: |
#!/usr/bin/env bash
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM golang:1.26 as build-stage
# The major.minor of the `go` directive in `go.mod`, passed by the `action-*.yml` workflows.
ARG GO_VERSION
FROM golang:${GO_VERSION} as build-stage

WORKDIR /src
ENV GO111MODULE=on CGO_ENABLED=0
Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module github.com/buildpacks/github-actions

go 1.26.0
// This must use the full `1.N.0` form, since that's what Go's tooling (and so Dependabot)
// rewrites it to. The GitHub Actions workflows use only the major.minor from this line for
// `setup-go` and the `golang` image tag, so that they get the latest patch release.
go 1.27.0

require (
github.com/buildpacks/libcnb v1.30.4
Expand Down
Loading