Merge pull request #471 from luciaprime54/fix/windows-error-codes #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspired from: https://docs.github.com/en/actions/guides/publishing-docker-images | |
name: Publish Docker images | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- 'v*' | |
jobs: | |
regular-image: | |
name: Regular image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: gosecure/pyrdp | |
tags: | | |
# set devel tag for default branch | |
type=raw,value=devel,enable={{is_default_branch}} | |
# set semantic versioning tags for git tags | |
type=semver,pattern={{version}} | |
- name: Build and push regular Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
slim-image: | |
name: Slim image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: gosecure/pyrdp | |
tags: | | |
# set devel tag for default branch | |
type=raw,value=devel,enable={{is_default_branch}} | |
# set semantic versioning tags for git tags | |
type=semver,pattern={{version}} | |
flavor: | | |
suffix=-slim,onlatest=true | |
- name: Build and push regular Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: Dockerfile.slim | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |