Actions master -> main

This commit is contained in:
2023-06-21 18:37:55 +02:00
parent 35b89aca72
commit 0f1f1f3388

View File

@@ -1,12 +1,12 @@
name: Build and Deploy
name: Build
on:
push:
branches: ["master"]
branches: ["main"]
# Publish semver tags as releases.
tags: ["v*.*.*"]
pull_request:
branches: ["master"]
branches: ["main"]
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
@@ -15,7 +15,7 @@ env:
# # Use docker.io for Docker Hub if empty
# REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build:
@@ -29,19 +29,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
# Workaround: https://github.com/docker/build-push-action/issues/461
# Workaround: https://gitea.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
if: gitea.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
@@ -59,7 +59,7 @@ jobs:
with:
context: .
file: docker/web/Containerfile
push: ${{ github.event_name != 'pull_request' }}
push: ${{ gitea.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha