38 lines
1007 B
YAML
38 lines
1007 B
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@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
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: Build and push Docker image for latest tag
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./build
|
|
push: true
|
|
tags: ${{ vars.DOCKER_REGISTRY_URL }}/${{ gitea.repository_owner }}/protonmail-bridge:latest
|
|
platforms: linux/amd64
|
|
build-args: |
|
|
VERSION=${{ env.VERSION }}
|