forked from SanderKnape/github-runner
-
Notifications
You must be signed in to change notification settings - Fork 2
26 lines (23 loc) · 732 Bytes
/
ci.yml
File metadata and controls
26 lines (23 loc) · 732 Bytes
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
name: Continous Integration
on:
push:
branches: [ master ]
env:
APP_NAME: trap-github-runner
TRAP_GH_ACTOR: CodeDatPiece
IMAGE_ID: ghcr.io/axa-ch-cloud/trap-github-runner
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: docker build -f Dockerfile -t $APP_NAME .
- name: Log into registry
run: echo "${{ secrets.TRAP_GH_TOKEN }}" | docker login ghcr.io -u $TRAP_GH_ACTOR --password-stdin
- name: Push image
run: |
docker tag $APP_NAME $IMAGE_ID:$GITHUB_SHA
docker push $IMAGE_ID:$GITHUB_SHA
docker tag $APP_NAME $IMAGE_ID:latest
docker push $IMAGE_ID:latest