'Generic Commit'
This commit is contained in:
@@ -9,12 +9,13 @@ defaults:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Login to Gitea
|
||||
@@ -23,12 +24,48 @@ jobs:
|
||||
registry: gitea.jde.nz
|
||||
username: DoesntMatter
|
||||
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
|
||||
- name: Build
|
||||
- name: Build
|
||||
run: |
|
||||
./build.sh
|
||||
- name: Test
|
||||
- name: Run Tests
|
||||
run: |
|
||||
./test.sh
|
||||
- name: Publish
|
||||
- name: Publish as Latest
|
||||
run: |
|
||||
SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} ./publish.sh
|
||||
# Only publish on main branch
|
||||
if [ "$GITHUB_REF" = "refs/heads/main" ]; then
|
||||
SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} \
|
||||
DOCKER_PUSH_TOKEN=${{ secrets.DOCKER_PUSH_TOKEN }} \
|
||||
./publish.sh
|
||||
fi
|
||||
|
||||
create-manifest:
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.jde.nz
|
||||
username: DoesntMatter
|
||||
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y jq
|
||||
|
||||
- name: Create and push manifest list
|
||||
run: |
|
||||
# Only create manifest on main branch
|
||||
if [ "$GITHUB_REF" = "refs/heads/main" ]; then
|
||||
# Create the manifest list using the architecture-specific digests
|
||||
docker manifest create gitea.jde.nz/public/simple-object-server:latest \
|
||||
--amend gitea.jde.nz/public/simple-object-server:latest-x86_64 \
|
||||
--amend gitea.jde.nz/public/simple-object-server:latest-aarch64
|
||||
|
||||
# Push the manifest list
|
||||
docker manifest push gitea.jde.nz/public/simple-object-server:latest
|
||||
|
||||
echo "Manifest list created and pushed successfully"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user