Skip to content

Commit

Permalink
build and publish image to github
Browse files Browse the repository at this point in the history
  • Loading branch information
tibroc committed Oct 27, 2023
1 parent 2768b76 commit dbb342f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 61 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/docker-image-master.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/docker-image-tag.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/docs-master.yaml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/publish-docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Docker image

on:
release:
types: [published]

jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}

- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit dbb342f

Please sign in to comment.