Skip to content

deps(deps): bump the data group across 1 directory with 2 updates #223

deps(deps): bump the data group across 1 directory with 2 updates

deps(deps): bump the data group across 1 directory with 2 updates #223

Workflow file for this run

---
name: docker
"on":
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
ISSUE_TOKEN: ${{ secrets.ISSUE_TOKEN }}
steps:
- uses: actions/checkout@v6
- name: log in to ghcr with PAT (if provided)
if: github.event_name == 'push' && env.ISSUE_TOKEN != ''
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ env.ISSUE_TOKEN }}
- name: log in to ghcr with GITHUB_TOKEN (fallback)
if: github.event_name == 'push' && env.ISSUE_TOKEN == ''
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.OWNER }}/${{ env.REPO }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
- name: build and push docker image
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: test docker image
if: github.event_name == 'push'
run: |
IMAGE=$(echo "${{ steps.meta.outputs.tags }}" | head -n1)
docker run --rm "$IMAGE" \
python -c "import harpertoken; print('Import successful')"
docker run --rm "$IMAGE" python -m unittest tests.test_unit