diff --git a/.github/workflows/publish-bundle.yaml b/.github/workflows/publish-bundle.yaml new file mode 100644 index 00000000..7ed50c4c --- /dev/null +++ b/.github/workflows/publish-bundle.yaml @@ -0,0 +1,60 @@ +name: Publish Zarf Package + +on: + workflow_call: + +permissions: + contents: read + packages: write + id-token: write + +jobs: + publish-package: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} + repository: ${{ github.repository }} + ref: ${{ github.ref_name }} + + - name: Login to Registry1 + uses: docker/login-action@v3 + with: + registry: registry1.dso.mil + username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} + password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} + + - name: Init zarf cache + uses: actions/cache@v3 + with: + path: "~/.zarf-cache" + key: zarf-cache + + - name: Free GH runner build space + run: | + df -h + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + sudo docker image prune --all --force + df -h + + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + #### + # Build and publish bundle + #### + - name: Build bundle + run: make build/all + + - name: Publish bundle + run: ./uds publish uds-bundle-software-factory-nutanix-amd64-*.tar.zst oci://ghcr.io/defenseunicorns/uds-bundle-software-factory-nutanix --no-progress + working-directory: build diff --git a/.github/workflows/tag-and-release.yaml b/.github/workflows/tag-and-release.yaml new file mode 100644 index 00000000..d35049d5 --- /dev/null +++ b/.github/workflows/tag-and-release.yaml @@ -0,0 +1,33 @@ +name: Tag, Test and Publish UDS Capability Artifactory + +on: + push: + branches: + - main + +permissions: + contents: read + packages: write + id-token: write + +jobs: + tag-new-version: + permissions: write-all + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release-flag.outputs.release_created }} + steps: + - name: Create Release Tag + id: tag + uses: google-github-actions/release-please-action@v3 + with: + command: manifest # use configs in release-please-config.json + - id: release-flag + run: echo "release_created=${{ steps.tag.outputs.release_created || false }}" >> $GITHUB_OUTPUT + + # Publish the uds bundle + publish-uds-bundle: + needs: tag-new-version + if: ${{ needs.tag-new-version.outputs.release_created == 'true'}} + uses: ./.github/workflows/publish-bundle.yaml + secrets: inherit diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..96d9691c --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0" +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..57b0a709 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [0.0.1] - 2023-11-30 +PRE RELEASE diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000..aff49929 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @anthonywendt @blancharda @jacobbmay diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..93daea1d --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,18 @@ +{ + "packages": { + ".": { + "release-type": "simple", + "draft": false, + "changelog-path": "CHANGELOG.md", + "changelog-sections": [ + { "type": "feat", "section": "Features", "hidden": false }, + { "type": "fix", "section": "Bug Fixes", "hidden": false }, + { "type": "chore", "section": "Miscellaneous", "hidden": false } + ], + "versioning": "always-bump-patch", + "extra-files": [ + "uds-bundle.yaml" + ] + } + } +} diff --git a/uds-bundle.yaml b/uds-bundle.yaml index 55010ef3..2b9d2332 100644 --- a/uds-bundle.yaml +++ b/uds-bundle.yaml @@ -3,7 +3,9 @@ kind: UDSBundle metadata: name: software-factory-nutanix description: A UDS bundle for deploying a software factory to an RKE2 cluster - version: 0.1.0 + # x-release-please-start-version + version: "0.1.0" + # x-release-please-end architecture: amd64 zarf-packages: