| name: integration |
| |
| concurrency: |
| group: ${{ github.head_ref || github.run_id }} |
| cancel-in-progress: true |
| |
| on: |
| pull_request: |
| types: |
| - opened |
| - synchronize |
| - reopened |
| paths: |
| - .github/workflows/integration.yml |
| - molecule/** |
| - playbooks/** |
| - plugins/** |
| - roles/** |
| push: |
| branches: |
| - main |
| paths: |
| - .github/workflows/integration.yml |
| - molecule/** |
| - playbooks/** |
| - plugins/** |
| - roles/** |
| |
| jobs: |
| molecule: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Install QEMU static binaries |
| uses: docker/setup-qemu-action@v2 |
| |
| - name: Configure Buildkit |
| uses: docker/setup-buildx-action@v2 |
| |
| - name: Checkout project |
| uses: actions/checkout@v3.0.2 |
| |
| - name: Set up Go |
| uses: actions/setup-go@v3.3.0 |
| with: |
| go-version-file: go.mod |
| cache: true |
| |
| - name: Authenticate with Quay.io |
| uses: docker/login-action@v2 |
| if: ${{ github.event_name == 'push' }} |
| with: |
| registry: quay.io |
| username: ${{ secrets.QUAY_USERNAME }} |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} |
| |
| - name: Build image |
| uses: docker/build-push-action@v3 |
| with: |
| cache-from: type=gha |
| cache-to: type=gha,mode=max |
| context: . |
| platforms: linux/amd64 |
| push: ${{ github.event_name == 'push' }} |
| tags: quay.io/vexxhost/atmosphere:${{ github.sha }} |
| |
| - name: Clean-up stale stacks |
| run: go run ./cmd/atmosphere-ci molecule cleanup |
| env: |
| OS_AUTH_URL: https://auth.vexxhost.net/v3 |
| OS_REGION_NAME: ca-ymq-1 |
| OS_USER_DOMAIN_NAME: Default |
| OS_USERNAME: ${{ secrets.OS_USERNAME }} |
| OS_PASSWORD: ${{ secrets.OS_PASSWORD }} |
| OS_PROJECT_DOMAIN_NAME: Default |
| OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }} |
| |
| - uses: gofrolist/molecule-action@v2.2.41 |
| timeout-minutes: 90 |
| env: |
| ATMOSPHERE_STACK_NAME: "atmosphere-${{ github.run_id }}-${{ github.run_attempt }}" |
| OS_AUTH_URL: https://auth.vexxhost.net/v3 |
| OS_REGION_NAME: ca-ymq-1 |
| OS_USER_DOMAIN_NAME: Default |
| OS_USERNAME: ${{ secrets.OS_USERNAME }} |
| OS_PASSWORD: ${{ secrets.OS_PASSWORD }} |
| OS_PROJECT_DOMAIN_NAME: Default |
| OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }} |
| |
| - name: Promote image |
| uses: akhilerm/tag-push-action@v2.0.0 |
| if: github.ref == 'refs/heads/main' |
| with: |
| src: quay.io/vexxhost/atmosphere:${{ github.sha }} |
| dst: quay.io/vexxhost/atmosphere:latest |