Use linux-ansible-init from azimuth-cloud image_utils collection #476
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
name: Build and test PR | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- ready_for_review | |
- reopened | |
branches: | |
- main | |
jobs: | |
# This job exists so that PRs from outside the main repo are rejected | |
fail_on_remote: | |
runs-on: ubuntu-latest | |
steps: | |
- name: PR must be from a branch in the stackhpc/azimuth-images repo | |
run: exit ${{ github.repository == 'stackhpc/azimuth-images' && '0' || '1' }} | |
# Build, publish and test the images | |
build_test_images: | |
needs: [fail_on_remote] | |
# Don't build draft PRs | |
if: ${{ !github.event.pull_request.draft }} | |
uses: ./.github/workflows/build_test_images.yaml | |
secrets: inherit | |
# Purge the manifest and images that we just tested from S3 | |
purge_images: | |
needs: [build_test_images] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install s3cmd | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y s3cmd | |
- name: Purge tested images from S3 | |
run: | | |
source ./bin/env-vars | |
./bin/purge-manifest "${GITHUB_SHA}.manifest" | |
env: | |
REPO_ROOT: ${{ github.workspace }} | |
ENVIRONMENT: arcus | |
ENV_VAR_FILES: common | |
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} |