35 lines
1,009 B
YAML
35 lines
1,009 B
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'website/**'
|
|
- '**/website.yaml'
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Install Node.js
|
|
run: apk add --no-cache nodejs npm
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
driver-opts: image=moby/buildkit:latest
|
|
install: true
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: actions
|
|
password: ${{ secrets.FORGEJO_TOKEN }}
|
|
- name: Extract the tag
|
|
id: extract_tag
|
|
run: echo "::set-output name=tag::$(echo ${{ env.FORGEJO_SHA }} | cut -c1-8)"
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
context: website
|
|
file: Dockerfile
|
|
tags: git.poire.dev/aramperes/poire.dev:${{ steps.extract_tag.outputs.tag }}
|