Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Bump docker/setup-buildx-action from 2 to 3 #26

Bump docker/setup-buildx-action from 2 to 3

Bump docker/setup-buildx-action from 2 to 3 #26

Workflow file for this run

name: Build and Deploy
on:
push:
pull_request:
branches:
- main
env:
PYTHON_VERSION: 3.9
BEEPER_BRIDGE_TYPE: signald
CI_REGISTRY_IMAGE: "${{ secrets.CI_REGISTRY }}/signald"
GHCR_REGISTRY: ghcr.io
GHCR_REGISTRY_IMAGE: "ghcr.io/${{ github.repository }}"
jobs:
build-docker:
runs-on: ubuntu-latest
env:
USER_AGENT: Signal-Android/5.52.1
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.CI_REGISTRY }}
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Login to ghcr
uses: docker/login-action@v2
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build Containerfile
uses: docker/build-push-action@v4
with:
context: .
pull: true
file: Containerfile
build-args: |
USER_AGENT=Signal-Android/5.52.1
tags: |
${{ env.CI_REGISTRY_IMAGE }}:${{ github.sha }}-normal
${{ env.GHCR_REGISTRY_IMAGE }}:${{ github.sha }}-normal
push: true
- name: Replace Containerfile with built image
run: |
sed -i "s#FROM .*#FROM ${{ env.CI_REGISTRY_IMAGE }}:${{ github.sha }}-normal#g" uid-transition.Containerfile
- name: Docker Build uid-transition.Containerfile
uses: docker/build-push-action@v4
with:
context: .
cache-from: ${{ env.CI_REGISTRY_IMAGE }}:latest
pull: true
file: uid-transition.Containerfile
build-args: |
USER_AGENT=Signal-Android/5.52.1
tags: |
${{ env.CI_REGISTRY_IMAGE }}:${{ github.sha }}
${{ env.GHCR_REGISTRY_IMAGE }}:${{ github.sha }}
push: true
deploy-docker:
runs-on: ubuntu-latest
needs:
- build-docker
if: github.ref == 'refs/heads/main'
steps:
- name: Login to Beeper Docker registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.CI_REGISTRY }}
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Login to ghcr
uses: docker/login-action@v2
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 }}"