namesny-com/.gitea/workflows/release.yaml

45 lines
1.1 KiB
YAML
Raw Normal View History

2023-11-23 18:13:55 +00:00
name: Build website container
on:
push:
branches:
- main
jobs:
build:
name: Build image
runs-on: ubuntu-latest
2023-11-23 18:26:01 +00:00
container: ghcr.io/catthehacker/ubuntu:act-latest
2023-11-23 18:13:55 +00:00
env:
IMAGE_NAME: namesny-com
REGISTRY: git.namesny.com
steps:
2023-11-23 18:23:46 +00:00
2023-11-23 18:13:55 +00:00
- name: Clone the repository
uses: actions/checkout@v3
2023-11-23 18:23:46 +00:00
- name: Install Buildah
2023-11-23 18:29:10 +00:00
run: sudo apt-get update -y && sudo apt-get install -y buildah
2023-11-23 18:26:01 +00:00
2023-11-23 18:13:55 +00:00
- name: Buildah Action
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ gitea.sha }}
containerfiles: |
./Dockerfile
- name: Log in to the Container registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Push to Container Repository
id: push-to-registry
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.REGISTRY }}