Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,76 @@ on:
env:
GHCR_REGISTRY: ghcr.io
GHCR_IMAGE_NAME: ${{ github.repository }}/tavern
GHCR_IMAGE_NAME_DEV: ${{ github.repository }}/devcontainer

jobs:
devcontainer-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
lfs: 'true'
- name: Replace lfs references with files
run: git lfs pull
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
spellshift/devcontainer
tags: |
type=ref,event=branch
type=edge,branch=main
type=sha,format=long

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
file: ./.devcontainer/Dockerfile
context: ./.devcontainer
push: true
target: production
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Extract metadata (tags, labels) for Docker
id: meta_ghcr
uses: docker/metadata-action@v5
with:
images: |
${{ env.GHCR_REGISTRY }}/${{ env.GHCR_IMAGE_NAME_DEV }}
tags: |
type=ref,event=branch
type=edge,branch=main
type=sha,format=long

- name: Build and push GHCR image
uses: docker/build-push-action@v6
with:
file: ./.devcontainer/Dockerfile
context: ./.devcontainer
push: true
target: production
tags: ${{ steps.meta_ghcr.outputs.tags }}
labels: ${{ steps.meta_ghcr.outputs.labels }}

tavern-docker:
runs-on: ubuntu-latest
permissions:
Expand Down
Loading