diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..435482d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + branches: + - main + push: + branches: + - main +permissions: + contents: read + + +jobs: + unit: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Install Go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: 1.21 + check-latest: true + - name: Run tests + run: go test -v ./... diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f77cb2b..dfb3f40 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,33 +46,22 @@ jobs: egress-policy: audit - name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2 + uses: github/codeql-action/init@e6a47e25652c5dbefe5b65d3b8e8dab0e9364b21 # v2.16.0 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - + - name: Install Go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: 1.21 + check-latest: true - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2 + uses: github/codeql-action/analyze@e6a47e25652c5dbefe5b65d3b8e8dab0e9364b21 # v2.16.0 with: category: "/language:${{matrix.language}}" diff --git a/pkg/goversion/version.go b/pkg/goversion/version.go index 5a95d2a..1ba51e4 100644 --- a/pkg/goversion/version.go +++ b/pkg/goversion/version.go @@ -1,6 +1,6 @@ package goversion const ( - DefaultVersion = "1.20.10" - OneTwentyOne = "1.21.3" + DefaultVersion = "1.20.13" + OneTwentyOne = "1.21.6" ) diff --git a/targets/target_test.go b/targets/target_test.go index cdc3166..74b815e 100644 --- a/targets/target_test.go +++ b/targets/target_test.go @@ -6,6 +6,7 @@ import ( "testing" "dagger.io/dagger" + "github.com/Azure/moby-packaging/pkg/goversion" "golang.org/x/sync/errgroup" ) @@ -32,7 +33,7 @@ func TestApt(t *testing.T) { if err != nil { t.Fatal(err) } - c, err := Jammy(ctx, client, platform) + c, err := Jammy(ctx, client, platform, goversion.DefaultVersion) if err != nil { t.Fatal(err) }