Skip to content

Commit

Permalink
Merge pull request #320 from IABTechLab/gdm-UID2-2283-release-artifacts
Browse files Browse the repository at this point in the history
UID2-2283 - Fixed draft release creation
  • Loading branch information
gmsdelmundo authored Jan 3, 2024
2 parents 1e83bbd + 3f57e74 commit 98e8e48
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/publish-all-operators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ jobs:
collectAllArtifacts:
name: Collect All Artifacts
runs-on: ubuntu-latest
needs: [buildPublic, buildGCP, buildAzure]
needs: [start, buildPublic, buildGCP, buildAzure]
steps:
- name: Download public artifacts
uses: actions/download-artifact@v3
with:
name: image_details
name: image-details
path: ./artifacts/public_operator

- name: Download GCP artifacts
Expand All @@ -119,29 +119,37 @@ jobs:
uses: geekyeggo/delete-artifact@v2
with:
name: |
image_details
image-details
gcp-oidc-deployment-files
azure-cc-deployment-files
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: operator_release
name: uid2-operator-release-${{ needs.start.outputs.new_version }}
path: ./artifacts/

release:
name: Create Release
runs-on: ubuntu-latest
needs: [start, collectAllArtifacts]
steps:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ needs.start.outputs.new_version }}-<ENCLAVE_PROTOCOL>
- name: Build changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v3
with:
toTag: v${{ needs.start.outputs.new_version }}
configurationJson: |
{
"template": "#{{CHANGELOG}}\n## Installation\n```\ndocker pull ${{ needs.start.outputs.new_version }}-<OPERATOR TYPE>\n```\n\n## Image reference to deploy: \n```\n${{ needs.start.outputs.new_version }}-<OPERATOR TYPE>\n```\n\n## TODO\nPlease attach both UID2 and EUID AWS private operator artifacts here.\n```\n\n## Changelog\n#{{UNCATEGORIZED}}",
"template": "#{{CHANGELOG}}\n## Installation\n```\ndocker pull ${{ steps.meta.outputs.tags }}\n```\n\n## Image reference to deploy: \n```\n${{ steps.meta.outputs.tags }}\n```\n\n## TODO\nPlease upload the zipped AWS artifacts to this draft. (version_number_input: ${{ needs.start.outputs.new_version }})\n```\n\n## Changelog\n#{{UNCATEGORIZED}}",
"pr_template": " - #{{TITLE}} - ( PR: ##{{NUMBER}} )"
}
env:
Expand All @@ -153,3 +161,5 @@ jobs:
name: ${{ needs.start.outputs.new_version }}
body: ${{ steps.changelog.outputs.changelog }}
draft: true
files: |
./artifacts/uid2-operator-release-${{ needs.start.outputs.new_version }}.zip
6 changes: 3 additions & 3 deletions .github/workflows/publish-azure-cc-enclave-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ jobs:
${{ env.ARTIFACTS_OUTPUT_DIR }}
- name: Generate release archive
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' }}
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE == 'true' }}
run: |
zip -j ${{ env.ARTIFACTS_OUTPUT_DIR }}/uid2-operator-deployment-artifacts-${{ steps.meta.outputs.version }}.zip ${{ env.ARTIFACTS_OUTPUT_DIR }}/*
- name: Build Changelog
id: github_release
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' }}
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE == 'true' }}
uses: mikepenz/release-changelog-builder-action@v3
with:
configurationJson: |
Expand All @@ -233,7 +233,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' }}
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE == 'true' }}
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.version.outputs.new_version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-gcp-oidc-enclave-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ jobs:
${{ env.ARTIFACTS_OUTPUT_DIR }}
- name: Generate release archive
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' }}
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE == 'true' }}
run: |
zip -j ${{ env.ARTIFACTS_OUTPUT_DIR }}/uid2-operator-deployment-artifacts-${{ steps.meta.outputs.version }}.zip ${{ env.ARTIFACTS_OUTPUT_DIR }}/*
- name: Build Changelog
id: github_release
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' }}
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE == 'true' }}
uses: mikepenz/release-changelog-builder-action@v3
with:
configurationJson: |
Expand All @@ -270,7 +270,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' }}
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE == 'true' }}
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.version.outputs.new_version }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-public-operator-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
steps:
- name: Collect artifacts
run: |
mkdir -p image_details
mkdir -p image-details
IMAGE_TAG=${{ needs.image.outputs.image_tag }}
IMAGE=$(jq -n --arg img "$IMAGE_TAG" '{image_tag: $img}')
echo $IMAGE > image_details/image.json
echo $IMAGE > image-details/image.json
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: image_details
path: image_details/
name: image-details
path: image-details/

0 comments on commit 98e8e48

Please sign in to comment.