Skip to content

Commit

Permalink
fix: port uds-common/setup action (#121)
Browse files Browse the repository at this point in the history
* fix: port uds-common/setup action

Signed-off-by: catsby <clint@defenseunicorns.com>

* chore: re-work to re-use uds-common task for setup-environment

Signed-off-by: catsby <clint@defenseunicorns.com>

* fix missing uds cli

Signed-off-by: catsby <clint@defenseunicorns.com>

* fix typo

Signed-off-by: catsby <clint@defenseunicorns.com>

* add setup environment task to other GHAs

Signed-off-by: catsby <clint@defenseunicorns.com>

---------

Signed-off-by: catsby <clint@defenseunicorns.com>
  • Loading branch information
catsby authored Nov 4, 2024
1 parent 49bb437 commit b2ed83f
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 28 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,20 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup UDS
if: always()
uses: defenseunicorns/uds-common/.github/actions/setup@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
- name: Install UDS CLI
uses: defenseunicorns/setup-uds@b987a32bac3baeb67bfb08f5e1544e2f9076ee8a # v1.0.0
with:
username: ${{secrets.IRON_BANK_ROBOT_USERNAME}}
password: ${{secrets.IRON_BANK_ROBOT_PASSWORD}}
# renovate: datasource=github-tags depName=defenseunicorns/uds-cli versioning=semver
version: v0.18.0

- name: Environment setup
run: |
uds run actions:setup-environment \
--set REGISTRY1_USERNAME="${{ secrets.IRON_BANK_ROBOT_USERNAME }}" \
--set REGISTRY1_PASSWORD="${{ secrets.IRON_BANK_ROBOT_PASSWORD }}" \
--set GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
--set CHAINGUARD_IDENTITY="${{ secrets.CHAINGUARD_IDENTITY }}"
shell: bash

# Step is not currently being used, could be uncommented if custom image support is needed in the future
# - name: Build the custom k3s image
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,20 @@ jobs:

- uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1

- name: Setup UDS
if: always()
uses: defenseunicorns/uds-common/.github/actions/setup@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
- name: Install UDS CLI
uses: defenseunicorns/setup-uds@b987a32bac3baeb67bfb08f5e1544e2f9076ee8a # v1.0.0
with:
username: ${{secrets.IRON_BANK_ROBOT_USERNAME}}
password: ${{secrets.IRON_BANK_ROBOT_PASSWORD}}

- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: dummy
password: ${{ secrets.GITHUB_TOKEN }}
# renovate: datasource=github-tags depName=defenseunicorns/uds-cli versioning=semver
version: v0.18.0

- name: Environment setup
run: |
uds run actions:setup-environment \
--set REGISTRY1_USERNAME="${{ secrets.IRON_BANK_ROBOT_USERNAME }}" \
--set REGISTRY1_PASSWORD="${{ secrets.IRON_BANK_ROBOT_PASSWORD }}" \
--set GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
--set CHAINGUARD_IDENTITY="${{ secrets.CHAINGUARD_IDENTITY }}"
shell: bash

- name: Publish the custom k3s image
run: uds run publish-image --set VERSION=${{matrix.version}} --no-progress
23 changes: 12 additions & 11 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,20 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup UDS
if: always()
uses: defenseunicorns/uds-common/.github/actions/setup@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
- name: Install UDS CLI
uses: defenseunicorns/setup-uds@b987a32bac3baeb67bfb08f5e1544e2f9076ee8a # v1.0.0
with:
username: ${{secrets.IRON_BANK_ROBOT_USERNAME}}
password: ${{secrets.IRON_BANK_ROBOT_PASSWORD}}
# renovate: datasource=github-tags depName=defenseunicorns/uds-cli versioning=semver
version: v0.18.0

- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: dummy
password: ${{ secrets.GITHUB_TOKEN }}
- name: Environment setup
run: |
uds run actions:setup-environment \
--set REGISTRY1_USERNAME="${{ secrets.IRON_BANK_ROBOT_USERNAME }}" \
--set REGISTRY1_PASSWORD="${{ secrets.IRON_BANK_ROBOT_PASSWORD }}" \
--set GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
--set CHAINGUARD_IDENTITY="${{ secrets.CHAINGUARD_IDENTITY }}"
shell: bash

- name: Publish the capability
run: |
Expand Down
3 changes: 3 additions & 0 deletions tasks.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
includes:
- actions: https://raw.githubusercontent.com/defenseunicorns/uds-common/refs/tags/v1.2.2/tasks/actions.yaml

variables:
- name: VERSION
default: "v1.30.4-k3s1"
Expand Down

0 comments on commit b2ed83f

Please sign in to comment.