diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml new file mode 100644 index 0000000..686e5ca --- /dev/null +++ b/.github/workflows/staging.yml @@ -0,0 +1,45 @@ +name: Build + +on: + workflow_dispatch: + push: + branches: + - main + +env: + REGISTRY: quay.io + IMAGE_NAME: wire/github-app + +jobs: + deploy-staging: + runs-on: ubuntu-22.04 + if: github.actor != 'github-actions[bot]' + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + - name: Login to Quay.io + uses: docker/login-action@v4 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_ROBOT_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v6 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + flavor: latest=false + tags: | + type=sha,format=short + + - name: Build and push + uses: docker/build-push-action@v7 + with: + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}