Mohammed Naser | 9a5ff20 | 2022-09-07 15:56:48 -0400 | [diff] [blame] | 1 | name: integration |
| 2 | |
| 3 | concurrency: |
| 4 | group: ${{ github.head_ref || github.run_id }} |
| 5 | cancel-in-progress: true |
| 6 | |
| 7 | on: |
| 8 | pull_request: |
| 9 | types: |
| 10 | - opened |
| 11 | - synchronize |
| 12 | - reopened |
| 13 | paths: |
| 14 | - .github/workflows/integration.yml |
Mohammed Naser | d06bfed | 2022-09-21 16:46:21 -0400 | [diff] [blame^] | 15 | - atmosphere/** |
Mohammed Naser | 9a5ff20 | 2022-09-07 15:56:48 -0400 | [diff] [blame] | 16 | - molecule/** |
| 17 | - playbooks/** |
| 18 | - plugins/** |
| 19 | - roles/** |
| 20 | push: |
| 21 | branches: |
| 22 | - main |
| 23 | paths: |
| 24 | - .github/workflows/integration.yml |
Mohammed Naser | d06bfed | 2022-09-21 16:46:21 -0400 | [diff] [blame^] | 25 | - atmosphere/** |
Mohammed Naser | 9a5ff20 | 2022-09-07 15:56:48 -0400 | [diff] [blame] | 26 | - molecule/** |
| 27 | - playbooks/** |
| 28 | - plugins/** |
| 29 | - roles/** |
| 30 | |
| 31 | jobs: |
| 32 | molecule: |
| 33 | runs-on: ubuntu-latest |
| 34 | steps: |
Mohammed Naser | e50b6b5 | 2022-09-21 16:05:56 -0400 | [diff] [blame] | 35 | - name: Install QEMU static binaries |
| 36 | uses: docker/setup-qemu-action@v2 |
| 37 | |
| 38 | - name: Configure Buildkit |
| 39 | uses: docker/setup-buildx-action@v2 |
| 40 | |
Mohammed Naser | 9a5ff20 | 2022-09-07 15:56:48 -0400 | [diff] [blame] | 41 | - name: Checkout project |
| 42 | uses: actions/checkout@v3.0.2 |
| 43 | |
| 44 | - name: Set up Go |
| 45 | uses: actions/setup-go@v3.3.0 |
| 46 | with: |
| 47 | go-version-file: go.mod |
| 48 | cache: true |
| 49 | |
Mohammed Naser | 6d1f1b2 | 2022-09-21 15:41:53 -0400 | [diff] [blame] | 50 | - name: Authenticate with Quay.io |
| 51 | uses: docker/login-action@v2 |
| 52 | if: ${{ github.event_name == 'push' }} |
| 53 | with: |
| 54 | registry: quay.io |
| 55 | username: ${{ secrets.QUAY_USERNAME }} |
| 56 | password: ${{ secrets.QUAY_ROBOT_TOKEN }} |
| 57 | |
| 58 | - name: Build image |
| 59 | uses: docker/build-push-action@v3 |
| 60 | with: |
| 61 | cache-from: type=gha |
| 62 | cache-to: type=gha,mode=max |
| 63 | context: . |
| 64 | platforms: linux/amd64 |
| 65 | push: ${{ github.event_name == 'push' }} |
| 66 | tags: quay.io/vexxhost/atmosphere:${{ github.sha }} |
| 67 | |
Mohammed Naser | 9a5ff20 | 2022-09-07 15:56:48 -0400 | [diff] [blame] | 68 | - name: Clean-up stale stacks |
| 69 | run: go run ./cmd/atmosphere-ci molecule cleanup |
| 70 | env: |
| 71 | OS_AUTH_URL: https://auth.vexxhost.net/v3 |
| 72 | OS_REGION_NAME: ca-ymq-1 |
| 73 | OS_USER_DOMAIN_NAME: Default |
| 74 | OS_USERNAME: ${{ secrets.OS_USERNAME }} |
| 75 | OS_PASSWORD: ${{ secrets.OS_PASSWORD }} |
| 76 | OS_PROJECT_DOMAIN_NAME: Default |
| 77 | OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }} |
| 78 | |
dependabot[bot] | 5ea722f | 2022-09-12 03:46:06 +0000 | [diff] [blame] | 79 | - uses: gofrolist/molecule-action@v2.2.41 |
Mohammed Naser | 9a5ff20 | 2022-09-07 15:56:48 -0400 | [diff] [blame] | 80 | timeout-minutes: 90 |
| 81 | env: |
| 82 | ATMOSPHERE_STACK_NAME: "atmosphere-${{ github.run_id }}-${{ github.run_attempt }}" |
| 83 | OS_AUTH_URL: https://auth.vexxhost.net/v3 |
| 84 | OS_REGION_NAME: ca-ymq-1 |
| 85 | OS_USER_DOMAIN_NAME: Default |
| 86 | OS_USERNAME: ${{ secrets.OS_USERNAME }} |
| 87 | OS_PASSWORD: ${{ secrets.OS_PASSWORD }} |
| 88 | OS_PROJECT_DOMAIN_NAME: Default |
| 89 | OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }} |
Mohammed Naser | 6d1f1b2 | 2022-09-21 15:41:53 -0400 | [diff] [blame] | 90 | |
| 91 | - name: Promote image |
| 92 | uses: akhilerm/tag-push-action@v2.0.0 |
| 93 | if: github.ref == 'refs/heads/main' |
| 94 | with: |
| 95 | src: quay.io/vexxhost/atmosphere:${{ github.sha }} |
| 96 | dst: quay.io/vexxhost/atmosphere:latest |