Skip to content

Bump golang.org/x/crypto #41

Bump golang.org/x/crypto

Bump golang.org/x/crypto #41

Workflow file for this run

name: Build and Publish Test Image for Branch to GHCR
on:
push:
branches-ignore:
- main # ignore main branch as another file handles it
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch name
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Sanitize branch name for Docker tag
run: |
SAFE_TAG=$(echo "${BRANCH_NAME}" | tr '/' '-' | tr -cd '[:alnum:]-')
echo "SAFE_TAG=$SAFE_TAG" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.SAFE_TAG }}