Add Signoff CI to Enforce Signoff requirement. (#395) #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copied from https://github.com/matrix-org/matrix-bifrost/blob/develop/.github/workflows/docker-hub-latest.yml | |
name: "Docker Hub - Develop" | |
on: | |
push: | |
branches: | |
- main | |
env: | |
DOCKER_NAMESPACE: gnuxie | |
PLATFORMS: linux/amd64,linux/arm64 | |
# Only push if this is main, otherwise we just want to build | |
PUSH: ${{ github.ref == 'refs/heads/main' }} | |
jobs: | |
docker-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Unshallow for git describe so we can create version.txt | |
run: git fetch --prune --unshallow --tags --all --force | |
- name: Prepare version file | |
run: git describe > version.txt | |
# Needed for multi platform builds | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: ${{ env.PLATFORMS }} | |
push: ${{ env.PUSH }} | |
tags: | | |
${{ env.DOCKER_NAMESPACE }}/draupnir:develop |