From a3609f03c2ebf617b81400b1319725568eaf96a6 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Fri, 4 Oct 2024 16:05:19 +0100 Subject: [PATCH] Some basic structure for workflows --- .github/workflows/pull-request.yaml | 20 ++++++++++++ .github/workflows/release.yaml | 47 +++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .github/workflows/pull-request.yaml create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 00000000..6080b661 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -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 + diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..f678105c --- /dev/null +++ b/.github/workflows/release.yaml @@ -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 +