Skip to content

Add send-state <status> command #19

Add send-state <status> command

Add send-state <status> command #19

Workflow file for this run

name: Build Docker
on:
push:
pull_request:
branches: [main]
env:
BEEPER_BRIDGE_TYPE: dummybridge
CI_REGISTRY_IMAGE: "${{ secrets.CI_REGISTRY }}/bridge/dummybridge"
GHCR_REGISTRY: ghcr.io
GHCR_REGISTRY_IMAGE: "ghcr.io/${{ github.repository }}/go"
GHCR_REGISTRY_LOGINHELPER_IMAGE: "ghcr.io/${{ github.repository }}/loginhelper"
jobs:
build-docker-dummybridge:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Beeper Docker registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.CI_REGISTRY }}
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build
uses: docker/build-push-action@v6
with:
# cache-from: ${{ env.CI_REGISTRY_IMAGE }}:latest
pull: true
file: ./cmd/dummybridge/Dockerfile
tags: |
${{ env.CI_REGISTRY_IMAGE }}:${{ github.sha }}
${{ env.GHCR_REGISTRY_IMAGE }}:${{ github.sha }}
push: true
deploy-docker-dummybridge:
runs-on: ubuntu-latest
needs:
- build-docker-dummybridge
if: github.ref == 'refs/heads/main'
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Beeper Docker registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.CI_REGISTRY }}
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: beeper/docker-retag-push-latest@main
with:
image: ${{ env.CI_REGISTRY_IMAGE }}
- uses: beeper/docker-retag-push-latest@main
with:
image: ${{ env.GHCR_REGISTRY_IMAGE }}
- name: Run bridge CD tool
uses: beeper/bridge-cd-tool@main
env:
CI_REGISTRY: "${{ secrets.CI_REGISTRY }}"
BEEPER_DEV_ADMIN_API_URL: "${{ secrets.BEEPER_DEV_ADMIN_API_URL }}"
BEEPER_STAGING_ADMIN_API_URL: "${{ secrets.BEEPER_STAGING_ADMIN_API_URL }}"
BEEPER_PROD_ADMIN_API_URL: "${{ secrets.BEEPER_PROD_ADMIN_API_URL }}"
BEEPER_DEV_ADMIN_NIGHTLY_PASS: "${{ secrets.BEEPER_DEV_ADMIN_NIGHTLY_PASS }}"
BEEPER_STAGING_ADMIN_NIGHTLY_PASS: "${{ secrets.BEEPER_STAGING_ADMIN_NIGHTLY_PASS }}"
BEEPER_PROD_ADMIN_NIGHTLY_PASS: "${{ secrets.BEEPER_PROD_ADMIN_NIGHTLY_PASS }}"
build-docker-loginhelper:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build
uses: docker/build-push-action@v6
with:
cache-from: ${{ env.GHCR_REGISTRY_LOGINHELPER_IMAGE }}/loginhelper:latest
pull: true
file: ./cmd/loginhelper/Dockerfile
tags: |
${{ env.GHCR_REGISTRY_LOGINHELPER_IMAGE }}:${{ github.sha }}
${{ env.GHCR_REGISTRY_LOGINHELPER_IMAGE }}:latest
push: true