Skip to content

Commit

Permalink
[ci skip] Refactor CI workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
metaskills authored Feb 13, 2023
1 parent 64ffd61 commit 1d0f230
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 22 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: devcontainers/ci@v0.2
env:
env:
DOCKER_LOGIN_PAT: ${{ secrets.DOCKER_LOGIN_PAT }}
with:
push: never
Expand All @@ -39,15 +39,14 @@ jobs:
DOCKER_LOGIN_PAT
runCmd: |
CRYPTEIA_VERSION=${{ github.event.inputs.version }} ./package/deploy-image-debian
CRYPTEIA_VERSION=latest ./package/deploy-image-debian
amzn:
name: AmazonLinux2 x86_64/arm64
runs-on: ubuntu-20.04
needs: image
steps:
- uses: actions/checkout@v3
- uses: devcontainers/ci@v0.2
env:
env:
DOCKER_LOGIN_PAT: ${{ secrets.DOCKER_LOGIN_PAT }}
with:
push: never
Expand All @@ -56,7 +55,6 @@ jobs:
DOCKER_LOGIN_PAT
runCmd: |
CRYPTEIA_VERSION=${{ github.event.inputs.version }} ./package/deploy-image-amzn
CRYPTEIA_VERSION=latest ./package/deploy-image-amzn
release:
name: Create Release
runs-on: ubuntu-20.04
Expand Down
27 changes: 18 additions & 9 deletions package/deploy-image-amzn
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@ fi
docker login ghcr.io -u "cink-continuous-integration" -p $DOCKER_LOGIN_PAT

./amzn/setup

BASE_NAME_AMD64="ghcr.io/customink/crypteia-extension-amzn-amd64"
docker build \
--platform linux/amd64 \
--tag "ghcr.io/customink/crypteia-extension-amzn-amd64:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_AMD64}:latest" \
--file package/Dockerfile .
docker push "ghcr.io/customink/crypteia-extension-amzn-amd64:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_AMD64}:latest"

./amzn/setup-arm64

BASE_NAME_ARM64="ghcr.io/customink/crypteia-extension-amzn-arm64"
docker build \
--platform linux/arm64 \
--tag "ghcr.io/customink/crypteia-extension-amzn-arm64:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_ARM64}:latest" \
--file package/Dockerfile .
docker push "ghcr.io/customink/crypteia-extension-amzn-arm64:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_ARM64}:latest"

docker manifest create \
"ghcr.io/customink/crypteia-extension-amzn:${CRYPTEIA_VERSION}" \
--amend "ghcr.io/customink/crypteia-extension-amzn-amd64:${CRYPTEIA_VERSION}" \
--amend "ghcr.io/customink/crypteia-extension-amzn-arm64:${CRYPTEIA_VERSION}"

--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
docker manifest push "ghcr.io/customink/crypteia-extension-amzn:${CRYPTEIA_VERSION}"

docker manifest create \
"ghcr.io/customink/crypteia-extension-amzn:latest" \
--amend "${BASE_NAME_AMD64}:latest" \
--amend "${BASE_NAME_ARM64}:latest"
docker manifest push "ghcr.io/customink/crypteia-extension-amzn:latest"
27 changes: 18 additions & 9 deletions package/deploy-image-debian
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@ fi
docker login ghcr.io -u "cink-continuous-integration" -p $DOCKER_LOGIN_PAT

./bin/setup

BASE_NAME_AMD64="ghcr.io/customink/crypteia-extension-debian-amd64"
docker build \
--platform linux/amd64 \
--tag "ghcr.io/customink/crypteia-extension-debian-amd64:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_AMD64}:latest" \
--file package/Dockerfile .
docker push "ghcr.io/customink/crypteia-extension-debian-amd64:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_AMD64}:latest"

./debian/setup-arm64

BASE_NAME_ARM64="ghcr.io/customink/crypteia-extension-debian-arm64"
docker build \
--platform linux/arm64 \
--tag "ghcr.io/customink/crypteia-extension-debian-arm64:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_ARM64}:latest" \
--file package/Dockerfile .
docker push "ghcr.io/customink/crypteia-extension-debian-arm64:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_ARM64}:latest"

docker manifest create \
"ghcr.io/customink/crypteia-extension-debian:${CRYPTEIA_VERSION}" \
--amend "ghcr.io/customink/crypteia-extension-debian-amd64:${CRYPTEIA_VERSION}" \
--amend "ghcr.io/customink/crypteia-extension-debian-arm64:${CRYPTEIA_VERSION}"

--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
docker manifest push "ghcr.io/customink/crypteia-extension-debian:${CRYPTEIA_VERSION}"

docker manifest create \
"ghcr.io/customink/crypteia-extension-debian:latest" \
--amend "${BASE_NAME_AMD64}:latest" \
--amend "${BASE_NAME_ARM64}:latest"
docker manifest push "ghcr.io/customink/crypteia-extension-debian:latest"

0 comments on commit 1d0f230

Please sign in to comment.