this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add workflow for publishing sonar to ghcr.io

+53
+53
.github/workflows/container-sonar-ghcr.yaml
··· 1 + name: container-sonar-ghcr 2 + on: [push] 3 + env: 4 + REGISTRY: ghcr.io 5 + USERNAME: ${{ github.actor }} 6 + PASSWORD: ${{ secrets.GITHUB_TOKEN }} 7 + 8 + # github.repository as <account>/<repo> 9 + IMAGE_NAME: ${{ github.repository }} 10 + 11 + jobs: 12 + container-bigsky-ghcr: 13 + if: github.repository == 'bluesky-social/indigo' 14 + runs-on: ubuntu-latest 15 + permissions: 16 + contents: read 17 + packages: write 18 + id-token: write 19 + 20 + steps: 21 + - name: Checkout repository 22 + uses: actions/checkout@v3 23 + 24 + - name: Setup Docker buildx 25 + uses: docker/setup-buildx-action@v1 26 + 27 + - name: Log into registry ${{ env.REGISTRY }} 28 + uses: docker/login-action@v2 29 + with: 30 + registry: ${{ env.REGISTRY }} 31 + username: ${{ env.USERNAME }} 32 + password: ${{ env.PASSWORD }} 33 + 34 + - name: Extract Docker metadata 35 + id: meta 36 + uses: docker/metadata-action@v4 37 + with: 38 + images: | 39 + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 40 + tags: | 41 + type=sha,enable=true,priority=100,prefix=sonar:,suffix=,format=long 42 + 43 + - name: Build and push Docker image 44 + id: build-and-push 45 + uses: docker/build-push-action@v4 46 + with: 47 + context: . 48 + file: ./cmd/sonar/Dockerfile 49 + push: ${{ github.event_name != 'pull_request' }} 50 + tags: ${{ steps.meta.outputs.tags }} 51 + labels: ${{ steps.meta.outputs.labels }} 52 + cache-from: type=gha 53 + cache-to: type=gha,mode=max