wynn/.gitea/workflows/dockerfiles.yml
a 7d0cb9d9ba
All checks were successful
commit-tag / commit-tag-image (map[context:./migrations file:./migrations/Dockerfile name:migrations]) (push) Successful in 18s
commit-tag / commit-tag-image (map[context:./ts file:./ts/Dockerfile name:ts]) (push) Successful in 52s
noot
2025-03-02 18:34:53 -06:00

47 lines
1.6 KiB
YAML

name: commit-tag
on:
push
jobs:
commit-tag-image:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
DOCKER_LATEST: nightly
RUNNER_TOOL_CACHE: /toolcache
REGISTRY: tuxpa.in
IMAGE_ROOT: a/wynn
strategy:
matrix:
args:
- name: ts
context: ./ts
file: ./ts/Dockerfile
- name: "migrations"
context: ./migrations
file: ./migrations/Dockerfile
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: https://tuxpa.in
username: actions_token
password: ${{ secrets.ACTIONS_TOKEN }}
- name: build and push docker images
uses: docker/build-push-action@v6
with:
context: ${{ matrix.args.context }}
file: ${{ matrix.args.file }}
platforms: linux/amd64
push: true
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_ROOT }}/${{matrix.args.name}}:cache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_ROOT }}/${{matrix.args.name}}:cache,mode=max,image-manifest=true,oci-mediatypes=true,type=registry
tags: |
${{env.REGISTRY}}/${{env.IMAGE_ROOT}}/${{matrix.args.name}}:${{ gitea.ref_name }},
${{env.REGISTRY}}/${{env.IMAGE_ROOT}}/${{matrix.args.name}}:${{ gitea.head_ref || gitea.ref_name }}