Relocate to GitHub

This commit is contained in:
Luke Tainton
2022-04-23 17:14:24 +01:00
parent ddda2e97e4
commit f7cfa565b1
5 changed files with 6 additions and 26 deletions

33
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Build
on:
push:
tags: '*'
jobs:
prepare-data:
name: Prepare Data
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.prepare.outputs.SOURCE_TAG }}
steps:
- id: prepare
name: Prepare environment variables
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
build:
name: GitHub Container Registry
runs-on: ubuntu-latest
needs: [prepare-data]
steps:
- uses: actions/checkout@v2
- name: Login
run: echo ${{ secrets.PAT }} | docker login ghcr.io -u luketainton --password-stdin
- name: Build
run: docker build . --file Dockerfile --tag ghcr.io/luketainton/hesk:${{ needs.prepare-data.outputs.tag }} --tag ghcr.io/luketainton/hesk:latest
- name: Push
run: |
docker push ghcr.io/luketainton/hesk:latest
docker push ghcr.io/luketainton/hesk:${{ needs.prepare-data.outputs.tag }}