mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-12 17:06:24 +02:00
Merge ae360ec29f
into 85eb47bcbb
This commit is contained in:
commit
43ebb16229
1 changed files with 35 additions and 39 deletions
74
.github/workflows/ci.yml
vendored
74
.github/workflows/ci.yml
vendored
|
@ -181,55 +181,31 @@ jobs:
|
||||||
ID_X86_64=$(docker load -i oci-image-x86_64-unknown-linux-musl-jemalloc.tar.gz | sed -n 's/Loaded image: \(.*\)/\1/p')
|
ID_X86_64=$(docker load -i oci-image-x86_64-unknown-linux-musl-jemalloc.tar.gz | sed -n 's/Loaded image: \(.*\)/\1/p')
|
||||||
docker tag $ID_X86_64 conduwuit:${{ github.sha }}-x86_64-jemalloc
|
docker tag $ID_X86_64 conduwuit:${{ github.sha }}-x86_64-jemalloc
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
env:
|
|
||||||
GITHUB_USERNAME: ${{ github.repository_owner }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
if: ${{ (env.GITHUB_USERNAME != '') && (env.GITHUB_TOKEN != '') }}
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Create and push combined manifest to GitHub
|
|
||||||
env:
|
|
||||||
GITHUB_USERNAME: ${{ github.repository_owner }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && (github.event_name != 'pull_request') && (env.GITHUB_USERNAME != '') && (env.GITHUB_TOKEN != '') }}
|
|
||||||
run: |
|
|
||||||
REPO_GHCR="ghcr.io/${{ github.repository }}"
|
|
||||||
SHA_TAG="${{ github.ref_name }}-${{ github.sha }}"
|
|
||||||
BRANCH_TAG="${{ github.ref_name }}"
|
|
||||||
if [ "$BRANCH_TAG" == "main" ]; then
|
|
||||||
BRANCH_TAG="latest"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker manifest create $REPO_GHCR:$SHA_TAG \
|
|
||||||
--amend conduwuit:${{ github.sha }}-x86_64-jemalloc \
|
|
||||||
--amend conduwuit:${{ github.sha }}-aarch64-jemalloc
|
|
||||||
docker manifest push $REPO_GHCR:$SHA_TAG
|
|
||||||
|
|
||||||
docker manifest create $REPO_GHCR:$BRANCH_TAG \
|
|
||||||
--amend conduwuit:${{ github.sha }}-x86_64-jemalloc \
|
|
||||||
--amend conduwuit:${{ github.sha }}-aarch64-jemalloc
|
|
||||||
docker manifest push $REPO_GHCR:$BRANCH_TAG
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
|
||||||
env:
|
env:
|
||||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
|
||||||
if: ${{ (env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '') }}
|
if: ${{ (github.event_name != 'pull_request') && (env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '') }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ env.DOCKER_USERNAME }}
|
username: ${{ vars.DOCKER_USERNAME }}
|
||||||
password: ${{ env.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Create and push combined manifest to Docker Hub
|
- name: Create and push combined manifest to Docker Hub
|
||||||
env:
|
env:
|
||||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
|
||||||
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && (github.event_name != 'pull_request') && (env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '') }}
|
if: ${{ (github.event_name != 'pull_request') && (env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '') }}
|
||||||
run: |
|
run: |
|
||||||
REPO_DOCKER="docker.io/${{ github.repository }}"
|
REPO_DOCKER="docker.io/${{ github.repository }}"
|
||||||
SHA_TAG="${{ github.ref_name }}-${{ github.sha }}"
|
SHA_TAG="${{ github.ref_name }}-${{ github.sha }}"
|
||||||
|
@ -247,3 +223,23 @@ jobs:
|
||||||
--amend conduwuit:${{ github.sha }}-x86_64-jemalloc \
|
--amend conduwuit:${{ github.sha }}-x86_64-jemalloc \
|
||||||
--amend conduwuit:${{ github.sha }}-aarch64-jemalloc
|
--amend conduwuit:${{ github.sha }}-aarch64-jemalloc
|
||||||
docker manifest push $REPO_DOCKER:$BRANCH_TAG
|
docker manifest push $REPO_DOCKER:$BRANCH_TAG
|
||||||
|
|
||||||
|
- name: Create and push combined manifest to GitHub
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
run: |
|
||||||
|
REPO_GHCR="ghcr.io/${{ github.repository }}"
|
||||||
|
SHA_TAG="${{ github.ref_name }}-${{ github.sha }}"
|
||||||
|
BRANCH_TAG="${{ github.ref_name }}"
|
||||||
|
if [ "$BRANCH_TAG" == "main" ]; then
|
||||||
|
BRANCH_TAG="latest"
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker manifest create $REPO_GHCR:$SHA_TAG \
|
||||||
|
--amend conduwuit:${{ github.sha }}-x86_64-jemalloc \
|
||||||
|
--amend conduwuit:${{ github.sha }}-aarch64-jemalloc
|
||||||
|
docker manifest push $REPO_GHCR:$SHA_TAG
|
||||||
|
|
||||||
|
docker manifest create $REPO_GHCR:$BRANCH_TAG \
|
||||||
|
--amend conduwuit:${{ github.sha }}-x86_64-jemalloc \
|
||||||
|
--amend conduwuit:${{ github.sha }}-aarch64-jemalloc
|
||||||
|
docker manifest push $REPO_GHCR:$BRANCH_TAG
|
||||||
|
|
Loading…
Add table
Reference in a new issue