isl-api/.forgejo/workflows/dev_build.yaml

41 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-01-28 19:23:49 -05:00
---
2024-01-31 14:51:42 -05:00
name: build
on:
push:
branches:
2024-02-04 10:10:11 -05:00
- dev
2024-02-02 10:04:53 -05:00
env:
DOCKER_HOST: tcp://docker-in-docker:2375
2024-01-28 19:23:49 -05:00
jobs:
2024-01-31 14:51:42 -05:00
build:
name: Build and push docker image
2024-01-31 22:31:50 -05:00
runs-on: docker
container:
2024-01-31 23:00:41 -05:00
image: node:21-alpine
2024-01-28 19:23:49 -05:00
steps:
- name: Install docker
2024-01-31 23:00:41 -05:00
shell: /bin/ash -e {0}
2024-02-01 22:47:00 -05:00
run: apk add --update docker git
2024-02-02 19:25:49 -05:00
- name: Check out the repo
uses: https://github.com/actions/checkout@v4
2024-02-02 00:00:00 -05:00
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
2024-02-02 19:39:04 -05:00
with:
2024-02-02 19:52:21 -05:00
driver-opts: |
network=host
2024-02-02 19:42:10 -05:00
config: .forgejo/build_configs/buildkitd.toml
2024-02-02 19:33:05 -05:00
- name: Login to docker repo
uses: docker/login-action@v3
with:
registry: "forgejo.merr.is"
username: ${{ github.actor }}
password: ${{ secrets.actions_token }}
- name: Build and push the image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
push: true
2024-02-02 19:59:51 -05:00
tags: forgejo.merr.is/${{ github.repository }}:build.${{ github.run_number }}