A very performant and light (2mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres/SQLite.
at master 1.8 kB view raw
1name: Docker 2 3on: 4 schedule: 5 - cron: "38 9 * * *" 6 push: 7 branches: ["main"] 8 tags: ["v*.*.*"] 9 pull_request: 10 branches: ["main"] 11 release: 12 types: [published] 13 14env: 15 REGISTRY: ghcr.io 16 IMAGE_NAME: ${{ github.repository }} 17 18jobs: 19 build: 20 runs-on: self-hosted 21 permissions: 22 contents: read 23 packages: write 24 id-token: write 25 26 steps: 27 - name: Checkout repository 28 uses: actions/checkout@v3 29 30 - name: Install cosign 31 if: github.event_name != 'pull_request' 32 uses: sigstore/cosign-installer@v3.8.1 33 with: 34 cosign-release: "v2.4.3" 35 36 - name: Setup Docker buildx 37 uses: docker/setup-buildx-action@v3 38 39 - name: Log into registry ${{ env.REGISTRY }} 40 if: github.event_name != 'pull_request' 41 uses: docker/login-action@v3 42 with: 43 registry: ${{ env.REGISTRY }} 44 username: ${{ github.actor }} 45 password: ${{ secrets.GITHUB_TOKEN }} 46 47 - name: Log in to Docker Hub 48 if: github.event_name != 'pull_request' 49 uses: docker/login-action@v3 50 with: 51 username: ${{ secrets.DOCKER_USERNAME }} 52 password: ${{ secrets.DOCKER_PASSWORD }} 53 54 - name: Extract metadata (tags, labels) for Docker 55 id: meta 56 uses: docker/metadata-action@v5 57 with: 58 images: | 59 ${{ env.IMAGE_NAME }} 60 ${{ env.REGISTRY }}/${{ github.repository }} 61 62 - name: Build and push Docker image 63 uses: docker/build-push-action@v6 64 with: 65 context: . 66 file: ./Dockerfile 67 platforms: linux/amd64,linux/arm64 68 push: ${{ github.event_name != 'pull_request' }} 69 tags: ${{ steps.meta.outputs.tags }} 70 labels: ${{ steps.meta.outputs.labels }}