-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.02 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: ☃ build-and-publish
on:
push:
branches-ignore:
- '*'
tags:
- '*'
workflow_dispatch:
env:
IMG_REPO: ghcr.io/dataquest-dev/docker-handle-server
JOBNAME: build-and-test
permissions:
contents: read
packages: write
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: mazoea/ga-maz/start@master
- uses: actions/checkout@v4
with:
submodules: recursive
- name: pull and build
run: |
TAG=${{ env.IMG_REPO }}:${{ github.ref_name }}
echo "Using TAG:$TAG"
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker pull $TAG || true
docker build . -f Dockerfile --tag $TAG --cache-from $TAG
- name: push image
run: |
docker push ${{ env.IMG_REPO }} --all-tags
if: ${{ success() && github.ref_type == 'tag' }}
- uses: mazoea/ga-maz/end@master
if: ${{ always() }}