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

42 lines
1.1 KiB
YAML
Raw Normal View History

2024-01-28 19:23:49 -05:00
---
2024-01-31 14:51:42 -05:00
name: build
on:
push:
branches:
- main
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 12:41:30 -05:00
- name: Print Some Debugging Info
shell: /bin/ash -e {0}
run: uname -m
2024-01-31 23:01:18 -05:00
- name: Check out the repo
uses: https://github.com/actions/checkout@v4
2024-02-02 10:11:33 -05:00
- name: Set up QEMU (Do I need this?)
uses: https://github.com/docker/setup-qemu-action@v3
2024-02-02 00:00:00 -05:00
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Login to docker repo
uses: docker/login-action@v3
with:
registry: "forgejo.merr.is"
username: ${{ github.actor }}
password: ${{ secrets.actions_token }}
2024-02-01 23:55:43 -05:00
- name: Build and push the image
uses: https://github.com/docker/build-push-action@v5
2024-02-01 23:55:43 -05:00
with:
2024-02-02 10:18:52 -05:00
context: .
2024-02-01 23:55:43 -05:00
push: true
tags: forgejo.merr.is/${{ github.repository }}:0.1.${{ github.run_number }}