chore: Bump dependencies #1021
Workflow file for this run
This file contains 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: OCI Distribution Spec - Content Management | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
concurrency: | |
group: content-management-${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
PGUSER: postgres | |
POSTGRES_DB: open_registry | |
POSTGRES_PASSWORD: Qwerty@123 | |
POSTGRES_USER: postgres | |
jobs: | |
conformance: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
PGUSER: postgres | |
POSTGRES_DB: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: Qwerty@123 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
cache-dependency-path: go.sum | |
- name: Build and configure OpenRegistry container image | |
run: | | |
IP=`hostname -I | awk '{print $1}'` | |
echo "IP=$IP" >> $GITHUB_ENV | |
echo "OCI_ROOT_URL=http://$IP:5000" >> $GITHUB_ENV | |
cp config.example.yaml config.yaml | |
IP=$IP yq e -i '.database.host = env(IP)' config.yaml | |
yq e -i '.dfs.mock.enabled = "true"' config.yaml | |
yq e -i '.dfs.mock.type = "FS"' config.yaml | |
go mod download | |
go build | |
make certs | |
./OpenRegistry migrations init \ | |
--admin-db="postgres" \ | |
--admin-db-username="postgres" \ | |
--admin-db-password=${POSTGRES_PASSWORD} \ | |
--database=${POSTGRES_DB} \ | |
--host=${IP} \ | |
--password=${POSTGRES_PASSWORD} \ | |
--insecure=true | |
nohup ./OpenRegistry start >> openregistry.log & | |
sleep 3 | |
curl -XPOST -d '{"email": "johndoe@example.com", "username": "johndoe", "password": "Qwerty@123"}' "http://${IP}:5000/auth/signup" | |
cat openregistry.log | |
- name: Run OCI Distribution Spec conformance tests | |
if: always() | |
run: | | |
git clone https://github.com/opencontainers/distribution-spec.git | |
pushd distribution-spec/conformance | |
git checkout v1.1.0-rc.3 | |
go test -c | |
./conformance.test | |
popd | |
mkdir -p .out/ && mv {distribution-spec/conformance/report.html,distribution-spec/conformance/junit.xml} .out/ | |
env: | |
OCI_ROOT_URL: ${{ env.OCI_ROOT_URL }} | |
OCI_USERNAME: johndoe | |
OCI_PASSWORD: Qwerty@123 | |
OCI_NAMESPACE: johndoe/distribution-test | |
OCI_TEST_PUSH: 1 | |
OCI_HIDE_SKIPPED_WORKFLOWS: 1 | |
OCI_CROSSMOUNT_NAMESPACE: johndoe/distribution-cross-mount | |
OCI_DEBUG: 0 | |
- name: Setup tmate session if mode is debug and OpenRegistry or OCI Tests Fail | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ always() && (github.event_name == 'workflow_dispatch') && inputs.debug_enabled }} | |
- name: Set output report name | |
id: vars | |
run: echo "short_commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Upload test results zip as build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: oci-distribution-content-management-report-${{ steps.vars.outputs.short_commit_hash }} | |
path: | | |
.out/report.html | |
.out/junit.xml | |
if: always() |