-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mikael Vanhemert
committed
Dec 18, 2023
1 parent
f80e917
commit 5f87140
Showing
3 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish UDS Package Gitlab | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
tag-new-version: | ||
name: 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 | ||
- id: release-flag | ||
run: echo "release_created=${{ steps.tag.outputs.release_created || false }}" >> $GITHUB_OUTPUT | ||
|
||
publish-package: | ||
needs: tag-new-version | ||
if: ${{ needs.tag-new-version.outputs.release_created == 'true' }} | ||
runs-on: ubuntu-latest | ||
name: Publish package | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Environment setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: dummy | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish Package | ||
run: uds run -f tasks/publish.yaml package |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
variables: | ||
- name: TARGET_REPO | ||
default: oci://ghcr.io/defenseunicorns/packages/uds | ||
|
||
- name: VERSION | ||
description: The version of the package to build | ||
# x-release-please-start-version | ||
default: "16.5.1-0" | ||
# x-release-please-end | ||
|
||
tasks: | ||
- name: package | ||
description: Build and publish the packages | ||
actions: | ||
- description: Create the packages | ||
cmd: | | ||
set -e | ||
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml gitlab-package --no-progress | ||
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml gitlab-package --no-progress | ||
- description: Publish the packages | ||
cmd: | | ||
set -e | ||
zarf package publish zarf-package-gitlab-amd64-${VERSION}.tar.zst ${TARGET_REPO} | ||
zarf package publish zarf-package-gitlab-arm64-${VERSION}.tar.zst ${TARGET_REPO} |