Bump docker/login-action from 4.5.2 to 4.6.0 #88
This file contains hidden or 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: 🧪 Test UBI10 runner | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "images/ubi10.Dockerfile" | |
| - "images/**.sh" | |
| - "images/software/*" | |
| - ".github/workflows/test-ubi10.yml" | |
| jobs: | |
| build: | |
| name: Build test image | |
| runs-on: ubuntu-latest # use the GitHub-hosted runner to build the image | |
| steps: | |
| - name: Set release id | |
| shell: bash | |
| run: echo "SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
| - name: Set up build summary | |
| shell: bash | |
| run: | | |
| echo '### Build summary 🚀' >> $GITHUB_STEP_SUMMARY | |
| echo ' ' >> $GITHUB_STEP_SUMMARY | |
| echo '- Changes that produced this build [here](${{ github.server_url }}/${{ github.repository }}/commit/${{ env.SHA_SHORT }}) ' >> $GITHUB_STEP_SUMMARY | |
| echo '- Full code at this point in time [here](${{ github.server_url }}/${{ github.repository }}/tree/${{ env.SHA_SHORT }})' >> $GITHUB_STEP_SUMMARY | |
| echo ' ' >> $GITHUB_STEP_SUMMARY | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Login to GHCR | |
| uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 | |
| with: | |
| file: "images/ubi10.Dockerfile" | |
| push: true | |
| tags: ghcr.io/some-natalie/kubernoodles/ubi10:test | |
| deploy: | |
| name: Deploy test image to `test-runners` namespace | |
| runs-on: ubuntu-latest # use the GitHub-hosted runner to deploy to test | |
| needs: [build] | |
| environment: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| # set up minikube | |
| - name: Set up minikube on the runner | |
| uses: medyagh/setup-minikube@e9e035a86bbc3caea26a450bd4dbf9d0c453682e # latest | |
| # set up cluster configs | |
| # local storage and the runner role for the k8s mode runner hooks | |
| - name: Set up local storage | |
| shell: bash | |
| run: | | |
| kubectl create namespace "test-runners" | |
| kubectl create namespace "ghec-runners" | |
| kubectl apply -f ./cluster-configs/k8s-mode-storage.yml | |
| kubectl apply -f ./cluster-configs/runner-role.yml | |
| - name: Install Helm | |
| uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 | |
| - name: Deploy ARC | |
| shell: bash | |
| run: | | |
| helm install arc \ | |
| --namespace "arc-systems" \ | |
| --create-namespace \ | |
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller \ | |
| --set image.tag=0.14.2 | |
| - name: Update deployment (using latest chart of actions-runner-controller-charts/auto-scaling-runner-set) | |
| shell: bash | |
| run: | | |
| helm install test-ubi10 \ | |
| --namespace "test-runners" \ | |
| --set-string githubConfigSecret.github_app_id="${{ vars.ARC_APP_ID }}" \ | |
| --set-string githubConfigSecret.github_app_installation_id="${{ vars.ARC_INSTALL_ID }}" \ | |
| --set-string githubConfigSecret.github_app_private_key="${{ secrets.ARC_APP_PRIVATE_KEY }}" \ | |
| -f deployments/helm-ubi10-test.yml \ | |
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set \ | |
| --version 0.14.2 | |
| - name: Sleep for 5 minutes to run tests on the runners | |
| shell: bash | |
| run: sleep 300 | |
| - name: Remove the runner deployment | |
| shell: bash | |
| run: | | |
| helm uninstall test-ubi10 --namespace "test-runners" | |
| - name: Output removal | |
| shell: bash | |
| run: | | |
| echo ' ' >> $GITHUB_STEP_SUMMARY | |
| echo '🧹 Test deployment removed' >> $GITHUB_STEP_SUMMARY | |
| test: | |
| name: Run tests! | |
| runs-on: [test-ubi10] | |
| needs: [build] | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Setup test summary | |
| shell: bash | |
| run: | | |
| echo '### Test summary 🧪' >> $GITHUB_STEP_SUMMARY | |
| echo ' ' >> $GITHUB_STEP_SUMMARY | |
| echo '- ✅ runner builds and deploys' >> $GITHUB_STEP_SUMMARY | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Print debug info | |
| uses: ./tests/debug | |
| - name: Sudo fails | |
| uses: ./tests/sudo-fails |