ci: deduplicate sync-orborus into reusable workflow
This commit is contained in:
@@ -2,11 +2,6 @@ name: nightly-dockerbuild
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
orborus_version:
|
|
||||||
description: "Orborus version to sync (default: nightly)"
|
|
||||||
required: false
|
|
||||||
default: "nightly"
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- nightly
|
- nightly
|
||||||
@@ -83,29 +78,7 @@ jobs:
|
|||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
||||||
sync-orborus:
|
sync-orborus:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/sync-orborus.yaml
|
||||||
strategy:
|
secrets: inherit
|
||||||
fail-fast: false
|
with:
|
||||||
matrix:
|
orborus_version: nightly
|
||||||
version: ["${{ github.event.inputs.orborus_version || 'nightly' }}"]
|
|
||||||
steps:
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Ghcr
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Pull, retag and push orborus
|
|
||||||
run: |
|
|
||||||
docker pull ghcr.io/shuffle/orborus:${{ matrix.version }}
|
|
||||||
docker tag ghcr.io/shuffle/orborus:${{ matrix.version }} ghcr.io/shuffle/shuffle-orborus:${{ matrix.version }}
|
|
||||||
docker tag ghcr.io/shuffle/orborus:${{ matrix.version }} ${{ secrets.DOCKERHUB_USERNAME }}/shuffle-orborus:${{ matrix.version }}
|
|
||||||
docker push ghcr.io/shuffle/shuffle-orborus:${{ matrix.version }}
|
|
||||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/shuffle-orborus:${{ matrix.version }}
|
|
||||||
|
|||||||
@@ -2,11 +2,6 @@ name: dockerbuild
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
orborus_version:
|
|
||||||
description: "Orborus version to sync (default: latest)"
|
|
||||||
required: false
|
|
||||||
default: "latest"
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -77,29 +72,7 @@ jobs:
|
|||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
||||||
sync-orborus:
|
sync-orborus:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/sync-orborus.yaml
|
||||||
strategy:
|
secrets: inherit
|
||||||
fail-fast: false
|
with:
|
||||||
matrix:
|
orborus_version: ${{ github.event.inputs.orborus_version || 'latest' }}
|
||||||
version: ["${{ github.event.inputs.orborus_version || 'latest' }}"]
|
|
||||||
steps:
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Ghcr
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Pull, retag and push orborus
|
|
||||||
run: |
|
|
||||||
docker pull ghcr.io/shuffle/orborus:${{ matrix.version }}
|
|
||||||
docker tag ghcr.io/shuffle/orborus:${{ matrix.version }} ghcr.io/shuffle/shuffle-orborus:${{ matrix.version }}
|
|
||||||
docker tag ghcr.io/shuffle/orborus:${{ matrix.version }} ${{ secrets.DOCKERHUB_USERNAME }}/shuffle-orborus:${{ matrix.version }}
|
|
||||||
docker push ghcr.io/shuffle/shuffle-orborus:${{ matrix.version }}
|
|
||||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/shuffle-orborus:${{ matrix.version }}
|
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ on:
|
|||||||
description: "Orborus version to sync"
|
description: "Orborus version to sync"
|
||||||
required: true
|
required: true
|
||||||
default: "latest"
|
default: "latest"
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
orborus_version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync-orborus:
|
sync-orborus:
|
||||||
@@ -14,7 +19,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version: ["${{ github.event.inputs.orborus_version }}"]
|
version: ["${{ inputs.orborus_version }}"]
|
||||||
steps:
|
steps:
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
|
|||||||
@@ -93,36 +93,7 @@ jobs:
|
|||||||
|
|
||||||
sync-orborus:
|
sync-orborus:
|
||||||
if: github.event.release.target_commitish == 'nightly'
|
if: github.event.release.target_commitish == 'nightly'
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/sync-orborus.yaml
|
||||||
steps:
|
secrets: inherit
|
||||||
- name: Set version
|
with:
|
||||||
id: set_version
|
orborus_version: ${{ github.event.release.tag_name }}
|
||||||
run: |
|
|
||||||
if [[ ${{ github.event_name }} == 'release' ]]; then
|
|
||||||
VERSION="${{ github.event.release.tag_name }}"
|
|
||||||
VERSION=${VERSION#v}
|
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "VERSION=nightly-untagged-latest" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Ghcr
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Pull, retag and push orborus
|
|
||||||
run: |
|
|
||||||
docker pull ghcr.io/shuffle/orborus:${{ steps.set_version.outputs.VERSION }}
|
|
||||||
docker tag ghcr.io/shuffle/orborus:${{ steps.set_version.outputs.VERSION }} ghcr.io/shuffle/shuffle-orborus:${{ steps.set_version.outputs.VERSION }}
|
|
||||||
docker tag ghcr.io/shuffle/orborus:${{ steps.set_version.outputs.VERSION }} ${{ secrets.DOCKERHUB_USERNAME }}/shuffle-orborus:${{ steps.set_version.outputs.VERSION }}
|
|
||||||
docker push ghcr.io/shuffle/shuffle-orborus:${{ steps.set_version.outputs.VERSION }}
|
|
||||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/shuffle-orborus:${{ steps.set_version.outputs.VERSION }}
|
|
||||||
Reference in New Issue
Block a user