blog/.gitea/workflows/build.yml

34 lines
1.0 KiB
YAML
Raw Normal View History

2024-12-01 09:55:16 +01:00
name: Release CI action
run-name: ${{ gitea.repository }} release
on:
push:
branches:
- main
jobs:
build-and-push-container:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
2024-12-02 17:53:31 +01:00
- name: qemu setup
uses: docker/setup-qemu-action@v3
- name: dockerx setup
uses: docker/setup-buildx-action@v1
2024-12-02 18:00:24 +01:00
# - name: Cache Docker layers
# uses: actions/cache@v2
# with:
# path: /tmp/.buildx-cache
# key: ${{ runner.os }}-buildx-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-
2024-12-01 09:55:16 +01:00
- name: login
uses: docker/login-action@v3
with:
# NOTE: See https://gitea.com/gitea/docs/pulls/77/files
registry: git.gtz.dk
username: ${{ gitea.actor }}
password: ${{ secrets.PACKAGE_TOKEN }}
2024-12-02 18:07:01 +01:00
- name: build and push container
run: docker buildx build --push --platform linux/amd64,linux/arm64 -t git.gtz.dk/${{ gitea.repository }}:latest .