chore(deps): update dependency golangci/golangci-lint to v2 #2387
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: push | |
| env: | |
| DATABASE_PASSWORD: passwordless | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Build | |
| uses: ./.github/actions/build | |
| env: | |
| RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} | |
| RELEASE_APP_PEM: ${{ secrets.RELEASE_APP_PEM }} | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Lint | |
| uses: ./.github/actions/lint | |
| env: | |
| RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} | |
| RELEASE_APP_PEM: ${{ secrets.RELEASE_APP_PEM }} | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Test | |
| uses: ./.github/actions/test | |
| env: | |
| DATABASE_PASSWORD: ${{ env.DATABASE_PASSWORD }} | |
| RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} | |
| RELEASE_APP_PEM: ${{ secrets.RELEASE_APP_PEM }} | |
| with: | |
| min_coverage: "80" | |
| security: | |
| name: Security | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Security | |
| uses: ./.github/actions/security | |
| env: | |
| RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} | |
| RELEASE_APP_PEM: ${{ secrets.RELEASE_APP_PEM }} | |
| pack: | |
| name: Pack and Upload | |
| runs-on: ubuntu-latest | |
| needs: [build, lint, test, security] | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| attestations: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Pack and Upload | |
| uses: ./.github/actions/pack | |
| with: | |
| action_token: ${{ secrets.GITHUB_TOKEN }} | |
| env: | |
| RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} | |
| RELEASE_APP_PEM: ${{ secrets.RELEASE_APP_PEM }} | |
| publish-dockerhub: | |
| name: Publish to Docker Hub | |
| runs-on: ubuntu-latest | |
| needs: [build, lint, test, security] | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup repository dependencies | |
| id: setup | |
| uses: ./.github/actions/setup | |
| env: | |
| RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} | |
| RELEASE_APP_PEM: ${{ secrets.RELEASE_APP_PEM }} | |
| - name: Setup build args | |
| id: setup-build-args | |
| shell: bash | |
| run: | | |
| source configs/dev/deploy.env || true | |
| source configs/dev/config.env || true | |
| echo "build_dir=${BUILD_DIR}" >> "${GITHUB_OUTPUT}" | |
| echo "port=${PORT}" >> "${GITHUB_OUTPUT}" | |
| echo "repo_name=${REPO_NAME}" >> "${GITHUB_OUTPUT}" | |
| echo "dockerfile=vendor/github.com/descope/common/build/docker/service/Dockerfile" >> "${GITHUB_OUTPUT}" | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata for Docker Hub | |
| id: meta-dockerhub | |
| uses: ./.github/actions/docker-metadata | |
| with: | |
| images: docker.io/descope/${{ steps.setup-build-args.outputs.repo_name }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| with: | |
| version: latest | |
| cache-binary: false | |
| - name: Build and push to Docker Hub | |
| uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0 | |
| with: | |
| context: . | |
| file: ${{ steps.setup-build-args.outputs.dockerfile }} | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.meta-dockerhub.outputs.tags }} | |
| labels: ${{ steps.meta-dockerhub.outputs.labels }} | |
| annotations: ${{ steps.meta-dockerhub.outputs.annotations }} | |
| secrets: | | |
| "github_token=${{ steps.setup.outputs.token }}" | |
| build-args: | | |
| build_dir=${{ steps.setup-build-args.outputs.build_dir }} | |
| port=${{ steps.setup-build-args.outputs.port }} | |
| repo_name=${{ steps.setup-build-args.outputs.repo_name }} | |
| GIT_SHA=${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Update Docker Hub README | |
| uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| repository: descope/${{ steps.setup-build-args.outputs.repo_name }} | |
| readme-filepath: ./README.md |