Repository navigation
DEVOPS-14554: consolidate atmos-runner tooling into github-runner #7
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 Docker Image Build | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - 'Dockerfile' | |
| - '.github/workflows/test-docker-image.yaml' | |
| jobs: | |
| build-test-image: | |
| name: Build Test Image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set lowercase owner | |
| run: echo "OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push test image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| platforms: linux/amd64 | |
| push: true | |
| tags: | | |
| ghcr.io/${{ env.OWNER }}/github-runner:test | |
| ghcr.io/${{ env.OWNER }}/github-runner:test-${{ github.sha }} | |
| verify-tools: | |
| name: Verify Pre-installed Tools | |
| needs: build-test-image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set lowercase owner | |
| run: echo "OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull and verify test image | |
| run: | | |
| docker pull ghcr.io/${{ env.OWNER }}/github-runner:test | |
| IMAGE="ghcr.io/${{ env.OWNER }}/github-runner:test" | |
| echo "Checking Atmos..." | |
| docker run --rm $IMAGE atmos version | |
| echo "Checking Terraform..." | |
| docker run --rm $IMAGE terraform version | |
| echo "Checking tfcmt..." | |
| docker run --rm $IMAGE tfcmt --version | |
| echo "Checking terraform-docs..." | |
| docker run --rm $IMAGE terraform-docs --version | |
| echo "Checking Infracost..." | |
| docker run --rm $IMAGE infracost --version | |
| echo "Checking Helm..." | |
| docker run --rm $IMAGE helm version | |
| echo "Checking Helmfile..." | |
| docker run --rm $IMAGE helmfile --version | |
| echo "Checking kubectl..." | |
| docker run --rm $IMAGE kubectl version --client | |
| echo "Checking helm-diff..." | |
| docker run --rm $IMAGE helm diff version | |
| echo "Checking AWS CLI..." | |
| docker run --rm $IMAGE aws --version | |
| echo "✅ All tools verified successfully!" |