fediverse.space/.github/workflows/deploy.yml

43 wiersze
1.1 KiB
YAML

2023-06-08 22:09:52 +00:00
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
2023-06-08 22:10:20 +00:00
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2023-06-08 22:09:52 +00:00
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
2023-06-08 22:10:20 +00:00
- name: Build & push
2023-06-08 22:09:52 +00:00
uses: depot/build-push-action@v1
with:
2023-06-10 08:36:03 +00:00
project: rktsv8c4sk
2023-06-08 22:09:52 +00:00
context: backend
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}