Skip to content

Update golang-dependencies #1452

Update golang-dependencies

Update golang-dependencies #1452

name: Build Dev Container
on:
push:
branches:
- '**'
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract branch name
id: branch
env:
REF_NAME: ${{ github.ref_name }}
run: |
# Sanitize branch name for Docker tag (replace / with -)
TAG=$(echo "$REF_NAME" | sed 's|/|-|g')
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
file: dev-container/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/hosted-pulp-dev-env:${{ steps.branch.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max