Skip to content

Bump pg from 8.21.0 to 8.22.0 in the ci group #155

Bump pg from 8.21.0 to 8.22.0 in the ci group

Bump pg from 8.21.0 to 8.22.0 in the ci group #155

Workflow file for this run

name: run-tests-on-pr
permissions:
contents: read
on:
pull_request:
jobs:
test-multi-arch-build:
uses: docker/github-builder/.github/workflows/build.yml@70ac3fc303efa83d2b94905e6ab78bb83cbdc2ae # v1.11.0
if: ${{ !github.event.pull_request.head.repo.fork }}
with:
output: image
push: false
platforms: linux/amd64,linux/arm64
sbom: true
cache: true
context: .
set-meta-labels: true
set-meta-annotations: true
meta-images: |
hello-world
meta-tags: |
type=ref,event=pr
secrets:
registry-auths: |
- username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
scan-container:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: checkout code in current PR branch
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Set up Docker
uses: docker/setup-docker-action@0234bb73ccb40f0c430b795634f9247e2b5c2d23 # v5.2.0
with:
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": true
}
}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: latest
- name: docker login docker.io
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: docker login dhi.io
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: dhi.io
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build container image from PR branch
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: .
push: false
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: mode=max
sbom: true
tags: hello-world:pr-${{ github.event.number }}
- name: docker images
run: |
docker images
- name: checkout code in main branch
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: main
- name: Build container image from main branch
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: .
push: false
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: mode=max
sbom: true
tags: hello-world:main
- name: docker images
run: |
docker images
- name: Docker Scout Comparison between main branch and current PR branch
uses: docker/scout-action@cd72f264beff1cd72735de31148b9d3244a0234a # v1.21.0
with:
command: compare
image: local://hello-world:pr-${{ github.event.number }}
to: local://hello-world:main
write-comment: true
github-token: ${{ secrets.GITHUB_TOKEN }}
organization: ${{ secrets.DOCKER_HUB_ORG }}
test-container:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
version: latest
- name: docker login
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: install score-compose
uses: score-spec/setup-score@1db79668fdd7b3e68ca5d5a734aad29ea75901cd # v3.2.3
with:
file: score-compose
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
- name: make compose-test
run: |
make compose-test
- name: make kind-create-cluster
run: |
make kind-create-cluster
- name: make kind-load-image
run: |
make kind-load-image
- name: install score-k8s
uses: score-spec/setup-score@1db79668fdd7b3e68ca5d5a734aad29ea75901cd # v3.2.3
with:
file: score-k8s
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
- name: make k8s-up
id: k8s-up
run: |
make k8s-up
- name: catch k8s-up errors
if: ${{ failure() && steps.k8s-up.outcome == 'failure' }}
run: |
kubectl get events
kubectl logs \
-l score-workload=hello-world