Test GHCR Write #280
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
# Copyright 2024 Defense Unicorns | |
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial | |
name: Test GHCR Write | |
on: | |
schedule: | |
- cron: '0 7 * * *' ## Every day at 0700 UTC | |
workflow_dispatch: ## Give us the ability to run this manually | |
permissions: | |
contents: read | |
# Abort prior jobs in the same workflow / PR | |
concurrency: | |
group: e2e-ghcr-write-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Setup golang | |
uses: ./.github/actions/golang | |
- name: Install UDS CLI | |
uses: ./.github/actions/install-uds-cli | |
- name: Build UDS-CLI binary | |
run: uds run build-cli-linux-amd | |
- name: Setup K3d | |
uses: ./.github/actions/k3d | |
- name: Login to GHCR | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run e2e tests | |
run: | | |
build/uds run test:e2e-ghcr | |
env: | |
GITHUB_TOKEN: secrets.GITHUB_TOKEN | |
- name: Save logs | |
if: always() | |
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1 | |
with: | |
suffix: nightly-ghcr |