docker-cross-compiler/.gitea/workflows/build.yaml

28 lines
1.0 KiB
YAML
Raw Normal View History

2024-03-19 16:17:44 +01:00
name: Build
run-name: Building docker container.
on:
push:
2024-06-13 20:17:13 +02:00
tags:
- '*'
2024-03-19 16:17:44 +01:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Update Package Repository.
run: apt update -y
- name: Gather dependencies.
run: apt install -y docker.io
- name: Log into Docker registry.
2024-06-13 20:17:13 +02:00
run: "echo ${{secrets.REFUEL_API_KEY}} | docker login -u ${{vars.DOCKER_USER_NAME}} --password-stdin git.mixedup.dev"
2024-03-19 16:17:44 +01:00
- name: Check repository out.
uses: actions/checkout@v3
- name: Build Docker Image
run: "docker build --no-cache -t git.mixedup.dev/refuel/docker-cross-compiler:${{gitea.ref_name}} ."
- name: Upload Docker Image
2024-06-13 20:17:13 +02:00
run: "docker push git.mixedup.dev/refuel/docker-cross-compiler:${{gitea.ref_name}}"
- name: Alias image as latest and push.
run: |
docker tag git.mixedup.dev/refuel/docker-cross-compiler:${{gitea.ref_name}} git.mixedup.dev/refuel/docker-cross-compiler:latest && \
docker push git.mixedup.dev/refuel/docker-cross-compiler:latest