-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: finish transition to github packages [4/4]
- Loading branch information
Showing
2 changed files
with
64 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
test: | ||
type: boolean | ||
description: Skip publishing step | ||
|
||
name: 🐳 Build & Publish Docker Image | ||
|
||
jobs: | ||
build-container: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 📥 Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🤖 Setup Qemu | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: "arm64" | ||
|
||
- name: 🐋 Setup Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: 🦥 Cache Image | ||
id: cache-image | ||
uses: actions/cache@v3 | ||
with: | ||
key: venmic-builder-cache | ||
path: | | ||
docker/venmic-builder-x86_64.tar | ||
docker/venmic-builder-arm64.tar | ||
- name: 🏗️ Build Image | ||
if: steps.cache-image.outputs.cache-hit != 'true' | ||
run: | | ||
cd docker | ||
docker buildx build --platform=linux/amd64 --tag venmic-builder-x86_64 --load . | ||
docker save venmic-builder-x86_64 > venmic-builder-x86_64.tar | ||
docker buildx build --platform=linux/arm64 --tag venmic-builder-arm64 --load . | ||
docker save venmic-builder-arm64 > venmic-builder-arm64.tar | ||
- name: 🔐 Login | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: ♻️ Publish Images | ||
run: | | ||
docker load < docker/venmic-builder-x86_64.tar | ||
docker load < docker/venmic-builder-arm64.tar | ||
docker image tag venmic-builder-arm64 ghcr.io/vencord/venmic-builder-arm64 | ||
docker image tag venmic-builder-x86_64 ghcr.io/vencord/venmic-builder-x86_64 | ||
docker push ghcr.io/vencord/venmic-builder-x86_64:latest | ||
docker push ghcr.io/vencord/venmic-builder-arm64:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters