name: Build Docker Images on: push: branches: - "main" tags: - "v*" pull_request: branches: - "main" jobs: docker-image-rp: # Use a matrix to build for both AMD64 and ARM64 strategy: matrix: arch: [amd64, arm64] # Switch the runner based on the architecture runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-latest-arm64' || 'ubuntu-latest' }} steps: - name: Checkout uses: actions/checkout@v4 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: ghcr.io/rosenpass/rp tags: | type=edge,branch=main type=sha,branch=main type=semver,pattern={{version}} labels: | maintainer=Karolin Varner , wucke13 org.opencontainers.image.authors=Karolin Varner , wucke13 org.opencontainers.image.title=Rosenpass org.opencontainers.image.description=The rp command-line integrates Rosenpass and WireGuard to help you create a VPN org.opencontainers.image.vendor=Rosenpass e.V. org.opencontainers.image.licenses=MIT OR Apache-2.0" org.opencontainers.image.url=https://rosenpass.eu org.opencontainers.image.documentation=https://rosenpass.eu/docs/ org.opencontainers.image.source=https://github.com/rosenpass/rosenpass - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push uses: docker/build-push-action@v6 with: context: . file: .docker/Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} target: rp platforms: linux/${{ matrix.arch }} docker-image-rosenpass: # Use a matrix to build for both AMD64 and ARM64 strategy: matrix: arch: [amd64, arm64] # Switch the runner based on the architecture runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-latest-arm64' || 'ubuntu-latest' }} steps: - name: Checkout uses: actions/checkout@v4 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: ghcr.io/rosenpass/rosenpass tags: | type=edge,branch=main type=sha,branch=main type=semver,pattern={{version}} labels: | maintainer=Karolin Varner , wucke13 org.opencontainers.image.authors=Karolin Varner , wucke13 org.opencontainers.image.title=Rosenpass org.opencontainers.image.description=Reference implementation of the protocol rosenpass protocol org.opencontainers.image.vendor=Rosenpass e.V. org.opencontainers.image.licenses=MIT OR Apache-2.0" org.opencontainers.image.url=https://rosenpass.eu org.opencontainers.image.documentation=https://rosenpass.eu/docs/ org.opencontainers.image.source=https://github.com/rosenpass/rosenpass - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push uses: docker/build-push-action@v6 with: context: . file: .docker/Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} target: rosenpass platforms: linux/${{ matrix.arch }}