diff --git a/.github/workflows/docker-hub-latest.yml b/.github/workflows/docker-hub-latest.yml new file mode 100644 index 00000000..ddcec01d --- /dev/null +++ b/.github/workflows/docker-hub-latest.yml @@ -0,0 +1,48 @@ +# Copied from https://github.com/matrix-org/matrix-bifrost/blob/develop/.github/workflows/docker-hub-release.yml +# This is duplicated with docker-hub-release.yml the only difference is the tag and hook + +name: "Docker Hub - Latest" + +on: + release: + types: [released] + +env: + DOCKER_NAMESPACE: gnuxie + PLATFORMS: linux/amd64,linux/arm64 + +jobs: + docker-release: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Get release tag + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - 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/setup-qemu-action@v3.0.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.3.0 + + - 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: true + tags: | + ${{ env.DOCKER_NAMESPACE }}/draupnir:latest diff --git a/.github/workflows/docker-hub-release.yml b/.github/workflows/docker-hub-release.yml index b7b88581..03958c6d 100644 --- a/.github/workflows/docker-hub-release.yml +++ b/.github/workflows/docker-hub-release.yml @@ -1,4 +1,5 @@ # Copied from https://github.com/matrix-org/matrix-bifrost/blob/develop/.github/workflows/docker-hub-release.yml +# This is duplicated with docker-hub-latest.yml the only difference is the tag and hook name: "Docker Hub - Release" @@ -45,4 +46,3 @@ jobs: push: true tags: | ${{ env.DOCKER_NAMESPACE }}/draupnir:${{ env.RELEASE_VERSION }} - ${{ env.DOCKER_NAMESPACE }}/draupnir:latest