docker-cross-compiler/.gitea/workflows/build.yaml
H. Utku Maden d0f5760c7a
All checks were successful
Build / build (push) Successful in 27m11s
Add --no-cache to the correct place in the build command.
2024-07-23 22:48:53 +03:00

28 lines
1.0 KiB
YAML

name: Build
run-name: Building docker container.
on:
push:
tags:
- '*'
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.
run: "echo ${{secrets.REFUEL_API_KEY}} | docker login -u ${{vars.DOCKER_USER_NAME}} --password-stdin git.mixedup.dev"
- 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
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