Skip to content

Commit

Permalink
Try fix
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Jan 17, 2025
1 parent 6013602 commit b1392df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/push-aws-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,18 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: |
git fetch --prune --unshallow
- name: Release space from worker
run: |
./.github/release-space-from-ubuntu-runners.sh
# - name: Release space from worker
# run: |
# ./.github/release-space-from-ubuntu-runners.sh
- name: Install kairos-agent (for versioneer)
uses: Luet-lab/luet-install-action@cec77490c3f2416d7d07a47cfab04d448641d7ce # v1.1
with:
repository: quay.io/kairos/packages
packages: system/kairos-agent
- name: Build 🔧
shell: bash
run: |
# REPLACE_IN_FINAL
# TODO: Does "sort" work correctly on k3s versions? Which version do we want?
#k3s_version=$(echo '${{ needs.get-standard-matrix.outputs.matrix }}' | \
# jq -r '[.[].k3s_version] | unique | sort | .[0]')
k3s_version=v1.32.0-k3s1
# REPLACE_IN_FINAL
#version=$(git describe --always --tags --dirty)
version=master
containerImage=$(kairos-agent versioneer container-artifact-name \
Expand All @@ -58,22 +52,23 @@ jobs:
--software-version "$k3s_version" \
--version "$version"
)
echo "Using $containerImage to build a cloud image"
docker run -v /var/run/docker.sock:/var/run/docker.sock --net host \
--privileged \
-v $PWD:/aurora --rm -ti quay.io/kairos/auroraboot \
-v $PWD:/aurora --rm quay.io/kairos/auroraboot \
--debug \
--set "disable_http_server=true" \
--set "container_image=docker:${containerImage}" \
--set "disable_netboot=true" \
--set "disk.raw=true" \
--set "state_dir=/aurora"
- name: Install AWS cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
# - name: Install AWS cli
# run: |
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# unzip awscliv2.zip
# sudo ./aws/install

# https://github.com/aws-actions/configure-aws-credentials?tab=readme-ov-file#assumerole-with-static-iam-credentials-in-repository-secrets
- name: Configure AWS Credentials
Expand All @@ -82,8 +77,8 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-external-id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
#role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
#role-external-id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
role-duration-seconds: 1200
role-session-name: AWSCIPush

Expand All @@ -93,5 +88,4 @@ jobs:
AWS_PROFILE: default
AWS_REGION: eu-central-1
run: |
AWS_PROFILE=kairos
.github/upload-image-to-aws.sh $(ls *.raw)
7 changes: 5 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ jobs:
k3s_version=$(echo '${{ needs.get-standard-matrix.outputs.matrix }}' | \
jq -r '[.[].k3s_version] | unique | sort | .[0]')
version=$(git describe --always --tags --dirty)
containerImage=$(kairos-agent versioneer container-artifact-name \
--flavor ${{ matrix.flavor }} \
--flavor-release ${{ matrix.flavor_release }} \
Expand All @@ -386,12 +388,13 @@ jobs:
--software-version-prefix k3s \
--registry-and-org quay.io/kairos \
--software-version "$k3s_version" \
--version $(git describe --always --tags --dirty)
--version "$version"
)
echo "Using $containerImage to build a cloud image"
docker run -v /var/run/docker.sock:/var/run/docker.sock --net host \
--privileged \
-v $PWD:/aurora --rm -ti quay.io/kairos/auroraboot \
-v $PWD:/aurora --rm quay.io/kairos/auroraboot \
--debug \
--set "disable_http_server=true" \
--set "container_image=docker:${IMAGE}" \
Expand Down

0 comments on commit b1392df

Please sign in to comment.