-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π· build(devcontainer): Fix issue with multi-architecture (#140)
* π· build(devcontainer): Update names * π· build(devcontainer): Build for amd64 and arm64 * π docs(local): Add link to devcontainers Signed-off-by: Mriyam Tamuli <[email protected]>
- Loading branch information
Showing
6 changed files
with
37 additions
and
12 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
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
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 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu |
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
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 |
---|---|---|
|
@@ -4,11 +4,11 @@ on: | |
push: | ||
branches: [main] | ||
paths: | ||
- .github/workflows/devcontainer-build-and-push.yml | ||
- .github/workflows/devcontainer-build-and-push.yaml | ||
- '.github/.devcontainer/**' | ||
pull_request: | ||
paths: | ||
- .github/workflows/devcontainer-build-and-push.yml | ||
- .github/workflows/devcontainer-build-and-push.yaml | ||
- '.github/.devcontainer/**' | ||
|
||
permissions: | ||
|
@@ -21,18 +21,35 @@ jobs: | |
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to the GitHub Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install updated skopeo | ||
# https://github.com/devcontainers/ci/issues/191#issuecomment-1416384710 | ||
run: | | ||
sudo apt purge buildah golang-github-containers-common podman skopeo | ||
sudo apt autoremove --purge | ||
REPO_URL="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable" | ||
source /etc/os-release | ||
sudo sh -c "echo 'deb ${REPO_URL}/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" | ||
sudo wget -qnv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O Release.key | ||
sudo apt-key add Release.key | ||
sudo apt-get update | ||
sudo apt-get install skopeo -y | ||
- name: Pre-build dev container image | ||
uses: devcontainers/[email protected] | ||
with: | ||
subFolder: .github | ||
imageName: ghcr.io/${{ github.repository }}/devcontainer | ||
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer | ||
platform: linux/amd64,linux/arm64 | ||
push: always |
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