Update Dagger and build. (#1610)

* Update Dagger and build

* Update dagger actions to use pinnning.
* Add /dagger to dependabot to keep the Dagger modules up-to-date.
* Update dagger default Go version.
* Update tutorials/whatsup Go version.
* Update actions to use pinning.

Signed-off-by: SuperQ <superq@gmail.com>

---------

Signed-off-by: SuperQ <superq@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
This commit is contained in:
Ben Kochie 2024-09-02 13:40:53 +02:00 committed by GitHub
parent 850b6c0898
commit 2cc3a2f5e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 17 additions and 13 deletions

View File

@ -4,6 +4,10 @@ updates:
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "gomod"
directory: "/dagger"
schedule:
interval: "monthly"
- package-ecosystem: "gomod"
directory: "/examples/middleware"
schedule:

View File

@ -46,7 +46,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@ -18,7 +18,7 @@ jobs:
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
steps:
- name: git checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set docker hub repo name
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
- name: Push README to Dockerhub
@ -40,7 +40,7 @@ jobs:
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
steps:
- name: git checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set quay.io org name
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
- name: Set quay.io repo name

View File

@ -23,9 +23,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Lint
uses: dagger/dagger-for-github@v5
uses: dagger/dagger-for-github@8ab204f3cf74a4940a1648469c426ef0d28af7cc # v6.6.0
with:
version: "latest"
verb: call

View File

@ -24,7 +24,7 @@ jobs:
supported_versions: ${{ steps.matrix.outputs.supported_versions }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Read supported_go_versions.txt
id: matrix
run: |
@ -43,17 +43,17 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Run tests and check license
uses: dagger/dagger-for-github@v5
uses: dagger/dagger-for-github@8ab204f3cf74a4940a1648469c426ef0d28af7cc # v6.6.0
with:
version: "latest"
verb: call
args: -vvv --src . make --go-version ${{matrix.go_version}} --args 'check_license test'
- name: Run style and unused
uses: dagger/dagger-for-github@v6
uses: dagger/dagger-for-github@8ab204f3cf74a4940a1648469c426ef0d28af7cc # v6.6.0
if: ${{ matrix.go_version == '1.21' }}
with:
version: "latest"

View File

@ -13,7 +13,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Execute bash script
run: bash update-go-version.bash
@ -22,7 +22,7 @@ jobs:
# no pull request will be created and the action exits silently.
- name: Create a Pull Request
if: github.event_name != 'pull_request'
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update Go Collector metrics for new Go version"

View File

@ -35,7 +35,7 @@ func New(src *dagger.Directory) *ClientGolang {
func (m *ClientGolang) Make(
// +optional
args string,
// +default="1.20"
// +default="1.23"
goVersion string,
// +optional
env []string,

View File

@ -1,6 +1,6 @@
module github.com/prometheus/client_golang/tutorials/whatsup
go 1.20
go 1.21
require (
github.com/bwplotka/tracing-go v0.0.0-20230421061608-abdf862ceccd