Some basic structure for workflows

This commit is contained in:
Cyber MacGeddon 2024-10-04 16:05:19 +01:00
parent 222dc9982c
commit a3609f03c2
2 changed files with 67 additions and 0 deletions

20
.github/workflows/pull-request.yaml vendored Normal file
View file

@ -0,0 +1,20 @@
name: Test pull request
on:
pull_request:
permissions:
contents: read
jobs:
container-push:
name: Do nothing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

47
.github/workflows/release.yaml vendored Normal file
View file

@ -0,0 +1,47 @@
name: Build
on:
workflow_dispatch:
push:
# branches:
# -
permissions:
contents: read
id-token: 'write'
jobs:
deploy:
name: Build everything
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get version
id: version
run: echo VERSION=sha-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
- name: Extract metadata for container
id: meta
uses: docker/metadata-action@v4
with:
images: accounts-svc
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build packages
run: make packages
- name: Build container
run: make container