cleanup: shed the openshell CLI active-gateway dependency and dead bridge methods #383
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: Images | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| REGISTRY: quay.io | |
| IMAGE_BASE: quay.io/rcochran/openshell | |
| jobs: | |
| sandbox: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check image inputs | |
| id: changes | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} | |
| run: | | |
| if [[ "$GITHUB_REF_TYPE" == tag || -z "$BASE_SHA" || "$BASE_SHA" =~ ^0+$ ]]; then | |
| changed=true | |
| elif git diff --quiet "$BASE_SHA" HEAD -- profiles/images/sandbox-default .github/workflows/images.yml; then | |
| changed=false | |
| else | |
| changed=true | |
| fi | |
| echo "changed=$changed" >> "$GITHUB_OUTPUT" | |
| - uses: docker/setup-qemu-action@v3 | |
| if: steps.changes.outputs.changed == 'true' | |
| - uses: docker/setup-buildx-action@v3 | |
| if: steps.changes.outputs.changed == 'true' | |
| - uses: docker/login-action@v3 | |
| if: steps.changes.outputs.changed == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ secrets.REGISTRY_QUAY_USER }} | |
| password: ${{ secrets.REGISTRY_QUAY_PASSWORD }} | |
| - name: Compute version tag | |
| id: version | |
| if: steps.changes.outputs.changed == 'true' | |
| run: echo "version=$(git describe --tags --always 2>/dev/null || echo dev)" >> "$GITHUB_OUTPUT" | |
| - uses: docker/metadata-action@v5 | |
| id: meta | |
| if: steps.changes.outputs.changed == 'true' | |
| with: | |
| images: ${{ env.IMAGE_BASE }} | |
| tags: | | |
| type=semver,pattern=sandbox-v{{version}} | |
| type=raw,value=sandbox-${{ steps.version.outputs.version }},enable=${{ github.ref_type != 'tag' }} | |
| - uses: docker/build-push-action@v6 | |
| if: steps.changes.outputs.changed == 'true' | |
| with: | |
| context: profiles/images/sandbox-default | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=registry,ref=${{ env.IMAGE_BASE }}:sandbox-cache | |
| cache-to: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && format('type=registry,ref={0}:sandbox-cache,mode=max', env.IMAGE_BASE) || '' }} |