Skip to content

Workflow file for this run

name: Publish Docker image
on:
release:
types:
- published
env:
GITHUB_REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/socks5-dante-proxy
DOCKER_REGISTRY_IMAGE: docker.io/aeron/socks5-dante-proxy
jobs:
build:
name: Build and push
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: recase
uses: ASzc/change-string-case-action@v6
with:
string: ${{ env.GITHUB_REGISTRY_IMAGE }}
- name: Set up QEMU
uses: docker/[email protected]
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
tags: >-
${{ steps.recase.outputs.lowercase }}:latest
${{ steps.recase.outputs.lowercase }}:${{ github.ref_name }}
${{ env.DOCKER_REGISTRY_IMAGE }}:latest
${{ env.DOCKER_REGISTRY_IMAGE }}:${{ github.ref_name }}
platforms: linux/amd64, linux/arm64
containerfiles: |
./dockerfile
- name: Log into GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Log into Docker Hub
uses: redhat-actions/podman-login@v1
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to registries
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.build-image.outputs.tags }}
- name: Update Docker Hub description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: aeron/socks5-dante-proxy
continue-on-error: true