Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

build-and-publish

build-and-publish #160

Workflow file for this run

name: build-and-publish
concurrency:
cancel-in-progress: true
group: build-and-publish
on:
push:
branches: [ "main" ]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
build-and-publish-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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: Install zarf
uses: supplypike/setup-bin@v3
with:
# renovate: zarf-uri datasource=github-tags depName=defenseunicorns/zarf
uri: 'https://github.com/defenseunicorns/zarf/releases/download/v0.29.1/zarf_v0.29.1_Linux_amd64'
name: 'zarf'
# renovate: datasource=github-tags depName=defenseunicorns/zarf versioning=semver
version: 'v0.29.1'
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to registry1
uses: docker/login-action@v2
with:
registry: registry1.dso.mil
username: ${{ secrets.REGISTRY1_USERNAME }}
password: ${{ secrets.REGISTRY1_PASSWORD }}
####
# Build and publish dependency packages to use in a dev UDS Bundle
####
- name: Build and publish dev-dependency gitlab runner rbac package
run: cd utils/pkg-deps/rbac && zarf package create --confirm --no-progress --output oci://ghcr.io/defenseunicorns/uds-capability/gitlab-runner/dev-dependency
####
# Build and publish capability package and skeleton
####
- name: Build and publish gitlab runner package
run: zarf package create --confirm --no-progress --output oci://ghcr.io/defenseunicorns/uds-capability
- name: Publish gitlab runner skeleton
run: zarf package publish . oci://ghcr.io/defenseunicorns/uds-capability