Files
protonmail-bridge/.gitea/workflows/prod-docker-images.yml
T
GitHub Actions 7c73e4e190
Build and Push Docker Container / build-and-push (push) Successful in 7m26s
update actions to new version:
- checkout: v6
- setup-buildx-action: v4
- login-action: v4
- build-push-action: v7
2026-03-10 08:54:35 +01:00

47 lines
1.4 KiB
YAML

name: Build and Push Docker Container
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
registry: ${{ vars.DOCKER_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.ACTION_ACCESS_TOKEN }}
- name: Set version
id: VERSION
run: echo "VERSION=`cat VERSION`" >> $GITHUB_ENV
- name: Convert repository owner to lowercase
run: echo "REPO_OWNER_LC=$(echo '${{ gitea.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and push Docker image for latest tag
uses: docker/build-push-action@v7
with:
context: ./build
push: true
tags: ${{ vars.DOCKER_REGISTRY_URL }}/${{ env.REPO_OWNER_LC }}/protonmail-bridge:latest
platforms: linux/amd64
build-args: |
VERSION=${{ env.VERSION }}
- name: Invoke Portainer Stack Deployment
if: ${{ vars.PORTAINER_STACK_WEBHOOK_URL && vars.PORTAINER_STACK_WEBHOOK_URL != '' }}
uses: distributhor/workflow-webhook@v3
with:
webhook_url: ${{ vars.PORTAINER_STACK_WEBHOOK_URL }}