This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
build-and-publish #73
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
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: 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.28.4/zarf_v0.28.4_Linux_amd64' | |
name: 'zarf' | |
# renovate: datasource=github-tags depName=defenseunicorns/zarf versioning=semver | |
version: 'v0.28.4' | |
- 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 }} | |
- name: Build gitlab package | |
run: zarf package create --confirm --no-progress | |
- name: Publish gitlab package | |
run: zarf package publish zarf-package-gitlab-amd64-*.tar.zst oci://ghcr.io/defenseunicorns/uds-capability --no-progress | |
- name: Publish gitlab skeleton | |
run: zarf package publish . oci://ghcr.io/defenseunicorns/uds-capability --no-progress |