kopia lustrzana https://github.com/fediversespace/fediverse.space
43 wiersze
1.1 KiB
YAML
43 wiersze
1.1 KiB
YAML
name: Build image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
# Permissions to use OIDC token authentication
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
# Allows pushing to the GitHub Container Registry
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: depot/setup-action@v1
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
- name: Build & push
|
|
uses: depot/build-push-action@v1
|
|
with:
|
|
project: rktsv8c4sk
|
|
context: backend
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|