Skip to content

Commit

Permalink
Add Docker publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Apr 14, 2024
1 parent 9be1213 commit 3d23d7a
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Images

Check failure on line 1 in .github/workflows/docker.yml

View workflow job for this annotation

GitHub Actions / docker

.github/workflows/docker.yml#L1

This run was manually canceled.

on: [push]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
${{ GITHUB.REPOSITORY }}
ghcr.io/${{ GITHUB.REPOSITORY }}
tags: |
type=ref,event=branch,pattern=dev
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 3d23d7a

Please sign in to comment.