chore: bump deps (#1105) #271
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
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| workflow_call: | |
| inputs: | |
| tag: | |
| description: 'Tag to use for the image' | |
| required: false | |
| type: string | |
| default: '' | |
| name: Publish Trickster Image | |
| concurrency: | |
| group: publish-image-${{ github.ref_name }} | |
| env: | |
| oci_metadata: | | |
| org.opencontainers.image.description="Open Source HTTP Reverse Proxy Cache and Time Series Dashboard Accelerator" | |
| jobs: | |
| publish-image: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v4 | |
| if: github.repository == 'trickstercache/trickster' # skip for forks | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Login to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| # Create an image for ghcr.io/github_owner/repo_name and docker.io/github_owner/repo_name | |
| images: | | |
| ghcr.io/${{ github.repository }} | |
| ${{ github.repository_owner == 'trickstercache' && github.repository || ''}} | |
| annotations: ${{ env.oci_metadata }} | |
| labels: ${{ env.oci_metadata }} | |
| flavor: | | |
| latest=${{ github.ref_name == 'main' && 'auto' || 'false' }} | |
| tags: | | |
| type=semver,pattern={{major}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{version}} | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=sha,format=long | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| id: build-and-push | |
| with: | |
| provenance: true | |
| sbom: true | |
| push: true | |
| file: ${{ github.workspace }}/Dockerfile | |
| context: ${{ github.workspace }} | |
| platforms: linux/amd64,linux/arm64/v8 | |
| annotations: ${{ steps.meta.outputs.annotations }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| GIT_LATEST_COMMIT_ID=${{ github.sha }} | |
| TAG_VER=${{ github.ref_name }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Install Cosign | |
| uses: sigstore/cosign-installer@v4.1.2 | |
| - name: Sign Images | |
| env: | |
| DIGEST: ${{ steps.build-and-push.outputs.digest }} | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| run: | | |
| images="" | |
| for tag in ${TAGS}; do | |
| images+="${tag}@${DIGEST} " | |
| done | |
| cosign sign --yes ${images} |