Skip to content

Bump the codeql group with 3 updates (#832) #1285

Bump the codeql group with 3 updates (#832)

Bump the codeql group with 3 updates (#832) #1285

Workflow file for this run

name: Build
on:
push:
branches: [develop]
tags:
- 'v[0-9]*'
pull_request:
branches: [develop]
jobs:
Verify:
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/go
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set Go version
id: go_version
run: |
GO_VERSION=$(sed -E -n '/^go / s/^go ([0-9]+\.[0-9]+)(\.[0-9]+)?$/\1/p' < go.mod)
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ steps.go_version.outputs.version }}
- name: Cache Godel assets
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.godel
key: ${{ runner.os }}-godel-${{ hashFiles('godelw', 'godel/config/godel.yml') }}
restore-keys: |
${{ runner.os }}-godel-
- name: Verify
run: ./godelw verify --apply=false
Dist:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GOPATH: /home/runner/go
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set Go version
id: go_version
run: |
GO_VERSION=$(sed -E -n '/^go / s/^go ([0-9]+\.[0-9]+)(\.[0-9]+)?$/\1/p' < go.mod)
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ steps.go_version.outputs.version }}
- name: Cache Godel assets
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.godel
key: ${{ runner.os }}-godel-${{ hashFiles('godelw', 'godel/config/godel.yml') }}
restore-keys: |
${{ runner.os }}-godel-
- name: Build distribution
run: ./godelw dist
- name: Build Docker image
run: ./godelw docker build --verbose
- name: Archive distribution
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: dist
path: |
build/bulldozer/*/bin/*.tgz
#
# Steps after this point should only run when publishing
# Include them here to avoid exporting the Docker container as an artifact
#
- name: Login to Docker Hub
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Push snapshot image to Docker Hub
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
run: ./godelw docker push --tags=snapshot
- name: Push release image to Docker Hub
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
run: ./godelw docker push --tags=latest,version
- name: Publish release assets
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
run: ./godelw publish github --add-v-prefix --api-url=${GITHUB_API_URL} --user=palantir --repository=bulldozer --token=${{ secrets.GITHUB_TOKEN }}
ci-all:
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs:
- Verify
- Dist
steps:
- name: Check required job results
run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}" == "true" ]]; then
echo "One or more required jobs did not succeed"
echo '${{ toJSON(needs) }}'
exit 1
fi
echo "All required jobs succeeded"