exmr/.forgejo/workflows/docker.yaml

35 lines
1.1 KiB
YAML
Raw Normal View History

2024-11-28 10:04:46 +02:00
name: Build and Push Docker Image
on:
push:
branches:
- main # Change this to your default branch if different
jobs:
build:
name: Build and Push Image
runs-on: ubuntu-latest-root # This specifies the environment for the job
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: git.vavakado.xyz # Replace with your Docker registry URL
2024-12-07 16:05:37 +02:00
username: ${{ forgejo.actor }} # The actor who triggered the action
2024-11-28 10:04:46 +02:00
password: ${{ secrets.REGISTRY_TOKEN }} # Your registry token secret
- name: Build Docker Image
run: |
TODAY=$(date +'%Y-%m-%d')
docker build -t git.vavakado.xyz/vavakado/exmr:${TODAY} .
docker tag git.vavakado.xyz/vavakado/exmr:${TODAY} git.vavakado.xyz/vavakado/exmr:latest
2024-11-28 10:04:46 +02:00
- name: Push Docker Image
run: |
TODAY=$(date +'%Y-%m-%d')
docker push git.vavakado.xyz/vavakado/exmr:${TODAY}
docker push git.vavakado.xyz/vavakado/exmr:latest