Skip to content

Add cargo and rustup bash completion (#53) #1

Add cargo and rustup bash completion (#53)

Add cargo and rustup bash completion (#53) #1

Workflow file for this run

name: 'Validate & Publish DevContainer'
description: 'This workflow is checking that for releases, updates do not break stuff and publishes the released container.'
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
name: 'Check, Build, Test, Publish DevContainer'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Use .devcontainer from THIS repo for building and testing
- name: Check, Build, Test, Publish
uses: devcontainers/ci@v0.3
with:
# The .devcontainer is never published as pre-built container.
# We want to only use it for building and testing the actual container, which resides in src/s-core-devcontainer.
push: "never"
runCmd: |
# Check
pre-commit run --show-diff-on-failure --color=always --all-files || exit -1
# Create builder for multi-arch builds
./scripts/create_builder.sh
# Build
./scripts/build.sh
# Test
./scripts/test.sh
# Publish
# We do not use the push feature of devcontainers/ci here, since that would push the wrong container.
# Instead, we use the publish script which pushes the correct container (residing in src/s-core-devcontainer).
# manually login to ghcr.io for publishing
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# Note: "${{ github.ref_name }}" will be the tag name, e.g., "1.0.0"
./scripts/publish.sh "${{ github.ref_name }}" "latest"