-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (24 loc) · 847 Bytes
/
Copy pathaws.yml
File metadata and controls
30 lines (24 loc) · 847 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
27
28
29
30
name: Deploy to AWS
on:
push:
tags:
- v*
env:
GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build image
run: |
GHCR_IMAGE=$(echo $GHCR_IMAGE | tr '[A-Z]' '[a-z]')
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
docker build -f ./build/docker/Dockerfile -t $GHCR_IMAGE:$VERSION .
- name: Push to Registry
run: |
GHCR_IMAGE=$(echo $GHCR_IMAGE | tr '[A-Z]' '[a-z]')
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
docker push $GHCR_IMAGE:$VERSION