From 32616510e29ddf33a5c9ddf15025d9b2b10e4d24 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 22 Jan 2024 14:56:58 +1100 Subject: [PATCH 1/9] Add new workflow --- .../release-docker-image-server-only.yaml | 34 +++++++++++++++++++ .../release-docker-image-standard.yaml | 34 +++++++++++++++++++ publisher/server_only/version.json | 1 + publisher/standard/version.json | 1 + 4 files changed, 70 insertions(+) create mode 100644 .github/workflows/release-docker-image-server-only.yaml create mode 100644 .github/workflows/release-docker-image-standard.yaml create mode 100644 publisher/server_only/version.json create mode 100644 publisher/standard/version.json diff --git a/.github/workflows/release-docker-image-server-only.yaml b/.github/workflows/release-docker-image-server-only.yaml new file mode 100644 index 0000000..b064fe2 --- /dev/null +++ b/.github/workflows/release-docker-image-server-only.yaml @@ -0,0 +1,34 @@ +name: Release UID2 Examples Image for Server Only +run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish Pre-release' || format('Release {0}', inputs.release_type)}} Server Only Docker Image by @${{ github.actor }} +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: 'The type of release' + options: + - Major + - Minor + - Patch + - Snapshot + pull_request: + +jobs: + incrementVersionNumber: + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v2 + with: + release_type: ${{ inputs.release_type }} + working_dir: publisher/server_only + secrets: inherit + + publishForServerOnly: + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@v2 + needs: incrementVersionNumber + with: + new_version: ${{ needs.incrementVersionNumber.outputs.new_version }} + image_tag: ${{ needs.incrementVersionNumber.outputs.image_tag }} + release_type: ${{ inputs.release_type }} + docker_file: publisher/server_only/Dockerfile + docker_image_name: IABTechLab/uid2-examples + docker_registry: ghcr.io + secrets: inherit diff --git a/.github/workflows/release-docker-image-standard.yaml b/.github/workflows/release-docker-image-standard.yaml new file mode 100644 index 0000000..abebe11 --- /dev/null +++ b/.github/workflows/release-docker-image-standard.yaml @@ -0,0 +1,34 @@ +name: Release UID2 Examples Image for Standard +run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish Pre-release' || format('Release {0}', inputs.release_type)}} Standard Docker Image by @${{ github.actor }} +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: 'The type of release' + options: + - Major + - Minor + - Patch + - Snapshot + pull_request: + +jobs: + incrementVersionNumber: + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v2 + with: + release_type: ${{ inputs.release_type }} + working_dir: publisher/standard + secrets: inherit + + publishForStandard: + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@v2 + needs: incrementVersionNumber + with: + new_version: ${{ needs.incrementVersionNumber.outputs.new_version }} + image_tag: ${{ needs.incrementVersionNumber.outputs.image_tag }} + release_type: ${{ inputs.release_type }} + docker_file: publisher/standard/Dockerfile + docker_image_name: IABTechLab/uid2-examples + docker_registry: ghcr.io + secrets: inherit diff --git a/publisher/server_only/version.json b/publisher/server_only/version.json new file mode 100644 index 0000000..63a625b --- /dev/null +++ b/publisher/server_only/version.json @@ -0,0 +1 @@ +{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "0.10.1", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } diff --git a/publisher/standard/version.json b/publisher/standard/version.json new file mode 100644 index 0000000..63a625b --- /dev/null +++ b/publisher/standard/version.json @@ -0,0 +1 @@ +{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "0.10.1", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } From cbef5ad5df2478deed6b5a224cb8ccc3bdaec461 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 22 Jan 2024 14:58:56 +1100 Subject: [PATCH 2/9] Use kcc-UID2-2674-implement-shared-publish-to-docker-versioned branch --- .github/workflows/release-docker-image-server-only.yaml | 4 ++-- .github/workflows/release-docker-image-standard.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-docker-image-server-only.yaml b/.github/workflows/release-docker-image-server-only.yaml index b064fe2..58e666b 100644 --- a/.github/workflows/release-docker-image-server-only.yaml +++ b/.github/workflows/release-docker-image-server-only.yaml @@ -15,14 +15,14 @@ on: jobs: incrementVersionNumber: - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v2 + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@kcc-UID2-2674-implement-shared-publish-to-docker-versioned with: release_type: ${{ inputs.release_type }} working_dir: publisher/server_only secrets: inherit publishForServerOnly: - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@v2 + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@kcc-UID2-2674-implement-shared-publish-to-docker-versioned needs: incrementVersionNumber with: new_version: ${{ needs.incrementVersionNumber.outputs.new_version }} diff --git a/.github/workflows/release-docker-image-standard.yaml b/.github/workflows/release-docker-image-standard.yaml index abebe11..36eba3a 100644 --- a/.github/workflows/release-docker-image-standard.yaml +++ b/.github/workflows/release-docker-image-standard.yaml @@ -15,14 +15,14 @@ on: jobs: incrementVersionNumber: - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v2 + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@kcc-UID2-2674-implement-shared-publish-to-docker-versioned with: release_type: ${{ inputs.release_type }} working_dir: publisher/standard secrets: inherit publishForStandard: - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@v2 + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@kcc-UID2-2674-implement-shared-publish-to-docker-versioned needs: incrementVersionNumber with: new_version: ${{ needs.incrementVersionNumber.outputs.new_version }} From 8ebca40e8be550e3ae0ba8da7f0145fdaaa5ef93 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 22 Jan 2024 15:18:12 +1100 Subject: [PATCH 3/9] Use correct version number --- publisher/server_only/version.json | 2 +- publisher/standard/version.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/publisher/server_only/version.json b/publisher/server_only/version.json index 63a625b..613e885 100644 --- a/publisher/server_only/version.json +++ b/publisher/server_only/version.json @@ -1 +1 @@ -{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "0.10.1", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } +{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "1.0.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } diff --git a/publisher/standard/version.json b/publisher/standard/version.json index 63a625b..613e885 100644 --- a/publisher/standard/version.json +++ b/publisher/standard/version.json @@ -1 +1 @@ -{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "0.10.1", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } +{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "1.0.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } From 9692ccc34bd526136136ea3cfd6761f5869ba573 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 22 Jan 2024 15:45:00 +1100 Subject: [PATCH 4/9] Rename run-name --- .github/workflows/release-docker-image-server-only.yaml | 2 +- .github/workflows/release-docker-image-standard.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-docker-image-server-only.yaml b/.github/workflows/release-docker-image-server-only.yaml index 58e666b..e58b295 100644 --- a/.github/workflows/release-docker-image-server-only.yaml +++ b/.github/workflows/release-docker-image-server-only.yaml @@ -1,5 +1,5 @@ name: Release UID2 Examples Image for Server Only -run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish Pre-release' || format('Release {0}', inputs.release_type)}} Server Only Docker Image by @${{ github.actor }} +run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish Pre-release' || format('Release {0}', inputs.release_type)}} UID2 Examples Image for Server Only by @${{ github.actor }} on: workflow_dispatch: inputs: diff --git a/.github/workflows/release-docker-image-standard.yaml b/.github/workflows/release-docker-image-standard.yaml index 36eba3a..6a62d57 100644 --- a/.github/workflows/release-docker-image-standard.yaml +++ b/.github/workflows/release-docker-image-standard.yaml @@ -1,5 +1,5 @@ name: Release UID2 Examples Image for Standard -run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish Pre-release' || format('Release {0}', inputs.release_type)}} Standard Docker Image by @${{ github.actor }} +run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish Pre-release' || format('Release {0}', inputs.release_type)}} UID2 Examples Image for Standard by @${{ github.actor }} on: workflow_dispatch: inputs: From 85bf286dbec9c35914ce09c8c6c4a4805f93a5c2 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 22 Jan 2024 19:00:26 +1100 Subject: [PATCH 5/9] Pass in docker_context --- .github/workflows/release-docker-image-server-only.yaml | 1 + .github/workflows/release-docker-image-standard.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/release-docker-image-server-only.yaml b/.github/workflows/release-docker-image-server-only.yaml index e58b295..d779106 100644 --- a/.github/workflows/release-docker-image-server-only.yaml +++ b/.github/workflows/release-docker-image-server-only.yaml @@ -29,6 +29,7 @@ jobs: image_tag: ${{ needs.incrementVersionNumber.outputs.image_tag }} release_type: ${{ inputs.release_type }} docker_file: publisher/server_only/Dockerfile + docker_context: publisher/server_only docker_image_name: IABTechLab/uid2-examples docker_registry: ghcr.io secrets: inherit diff --git a/.github/workflows/release-docker-image-standard.yaml b/.github/workflows/release-docker-image-standard.yaml index 6a62d57..3a100d6 100644 --- a/.github/workflows/release-docker-image-standard.yaml +++ b/.github/workflows/release-docker-image-standard.yaml @@ -29,6 +29,7 @@ jobs: image_tag: ${{ needs.incrementVersionNumber.outputs.image_tag }} release_type: ${{ inputs.release_type }} docker_file: publisher/standard/Dockerfile + docker_context: publisher/standard docker_image_name: IABTechLab/uid2-examples docker_registry: ghcr.io secrets: inherit From 7c2a48349b5b3deeafb9b0c320523c68a769d94a Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 22 Jan 2024 19:00:44 +1100 Subject: [PATCH 6/9] Remove pull_request from the workflow --- .github/workflows/release-docker-image-server-only.yaml | 1 - .github/workflows/release-docker-image-standard.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/release-docker-image-server-only.yaml b/.github/workflows/release-docker-image-server-only.yaml index d779106..6f04f7a 100644 --- a/.github/workflows/release-docker-image-server-only.yaml +++ b/.github/workflows/release-docker-image-server-only.yaml @@ -11,7 +11,6 @@ on: - Minor - Patch - Snapshot - pull_request: jobs: incrementVersionNumber: diff --git a/.github/workflows/release-docker-image-standard.yaml b/.github/workflows/release-docker-image-standard.yaml index 3a100d6..dcd9084 100644 --- a/.github/workflows/release-docker-image-standard.yaml +++ b/.github/workflows/release-docker-image-standard.yaml @@ -11,7 +11,6 @@ on: - Minor - Patch - Snapshot - pull_request: jobs: incrementVersionNumber: From 0413ebff2659badf0a1f13093d23de303d8d5200 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Mon, 22 Jan 2024 19:07:24 +1100 Subject: [PATCH 7/9] Use v2 version --- .github/workflows/release-docker-image-server-only.yaml | 4 ++-- .github/workflows/release-docker-image-standard.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-docker-image-server-only.yaml b/.github/workflows/release-docker-image-server-only.yaml index 6f04f7a..e907990 100644 --- a/.github/workflows/release-docker-image-server-only.yaml +++ b/.github/workflows/release-docker-image-server-only.yaml @@ -14,14 +14,14 @@ on: jobs: incrementVersionNumber: - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@kcc-UID2-2674-implement-shared-publish-to-docker-versioned + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v2 with: release_type: ${{ inputs.release_type }} working_dir: publisher/server_only secrets: inherit publishForServerOnly: - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@kcc-UID2-2674-implement-shared-publish-to-docker-versioned + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@v2 needs: incrementVersionNumber with: new_version: ${{ needs.incrementVersionNumber.outputs.new_version }} diff --git a/.github/workflows/release-docker-image-standard.yaml b/.github/workflows/release-docker-image-standard.yaml index dcd9084..286f9c1 100644 --- a/.github/workflows/release-docker-image-standard.yaml +++ b/.github/workflows/release-docker-image-standard.yaml @@ -14,14 +14,14 @@ on: jobs: incrementVersionNumber: - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@kcc-UID2-2674-implement-shared-publish-to-docker-versioned + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v2 with: release_type: ${{ inputs.release_type }} working_dir: publisher/standard secrets: inherit publishForStandard: - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@kcc-UID2-2674-implement-shared-publish-to-docker-versioned + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@v2 needs: incrementVersionNumber with: new_version: ${{ needs.incrementVersionNumber.outputs.new_version }} From 7ef087c9892705fba2904123154882fedb56e07e Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Tue, 23 Jan 2024 10:15:55 +1100 Subject: [PATCH 8/9] Remove single quote --- .github/workflows/release-docker-image-server-only.yaml | 2 +- .github/workflows/release-docker-image-standard.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-docker-image-server-only.yaml b/.github/workflows/release-docker-image-server-only.yaml index e907990..8204099 100644 --- a/.github/workflows/release-docker-image-server-only.yaml +++ b/.github/workflows/release-docker-image-server-only.yaml @@ -5,7 +5,7 @@ on: inputs: release_type: type: choice - description: 'The type of release' + description: The type of release options: - Major - Minor diff --git a/.github/workflows/release-docker-image-standard.yaml b/.github/workflows/release-docker-image-standard.yaml index 286f9c1..ba72470 100644 --- a/.github/workflows/release-docker-image-standard.yaml +++ b/.github/workflows/release-docker-image-standard.yaml @@ -5,7 +5,7 @@ on: inputs: release_type: type: choice - description: 'The type of release' + description: The type of release options: - Major - Minor From 3181c94192ad4dc5e13a7b33cddaa8ceceb6adc3 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Thu, 25 Jan 2024 08:12:32 +1100 Subject: [PATCH 9/9] Add required: true to release_type --- .github/workflows/release-docker-image-server-only.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-docker-image-server-only.yaml b/.github/workflows/release-docker-image-server-only.yaml index 8204099..614f91d 100644 --- a/.github/workflows/release-docker-image-server-only.yaml +++ b/.github/workflows/release-docker-image-server-only.yaml @@ -11,6 +11,7 @@ on: - Minor - Patch - Snapshot + required: true jobs: incrementVersionNumber: