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
|
2024-03-19 16:42:11 +01:00
|
|
|
- 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
|
2024-07-23 21:47:16 +02:00
|
|
|
run: "docker build -t --no-cache git.mixedup.dev/refuel/docker-cross-compiler:${{gitea.ref_name}} ."
|
2024-03-19 16:42:11 +01:00
|
|
|
- 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
|