2025-01-06 16:35:53 -08:00
|
|
|
# Create a Docker container from this project and post it to Forgejo (a fork of Gitea) from this Forgejo runner.
|
|
|
|
|
|
|
|
name: container
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2025-01-06 16:36:55 -08:00
|
|
|
- main
|
2025-01-06 16:35:53 -08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2025-01-06 16:38:55 -08:00
|
|
|
runs-on: docker
|
2025-01-06 16:35:53 -08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2025-01-06 16:40:11 -08:00
|
|
|
- name: Install Docker (Debian Bullseye)
|
|
|
|
run: |
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
|
|
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
|
|
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y docker-ce docker-ce-cli containerd.io
|
|
|
|
|
2025-01-06 16:35:53 -08:00
|
|
|
- name: Build the Docker image
|
|
|
|
run: docker build -t git.smgames.club/${{ env.GITHUB_REPOSITORY_OWNER }}/felidae-site:latest .
|
|
|
|
|
|
|
|
- name: Log in to the Forgejo Container Registry
|
|
|
|
run: echo "${{ secrets.FORGEJO_TOKEN }}" | docker login -u "${{ secrets.FORGEJO_USERNAME }}" --password-stdin git.smgames.club
|
|
|
|
|
|
|
|
- name: Push the Docker image
|
|
|
|
run: docker push git.smgames.club/${{ env.GITHUB_REPOSITORY_OWNER }}/felidae-site:latest
|