build@feature/rss_2024 #52
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
name: build-devcontainer | |
run-name: build@${{ github.ref_name }} | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- .github/.devcontainer/** | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: ghcr.io | |
permissions: | |
packages: write | |
steps: | |
- name: Remove unnecessary files | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
# - name: Install updated Skopeo | |
# # This can be omitted once runner images have a version of Skopeo > 1.4.1 | |
# # See https://github.com/containers/skopeo/issues/1874 | |
# 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 | |
- name: Log into registry ${{ env.REGISTRY }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pre-build dev container image | |
uses: devcontainers/[email protected] | |
env: | |
BUILDX_NO_DEFAULT_ATTESTATIONS: true | |
with: | |
imageName: ghcr.io/ethz-robotx/smb_docker | |
noCache: true | |
platform: linux/amd64,linux/arm64 | |
subFolder: .github | |
push: always |