-
-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (32 loc) · 992 Bytes
/
development.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
name: Publish Dev Image
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set ENV
run: |
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PUBLISH_PACKAGE_PAT }}
- name: Build Docker Images
run: |
docker build --build-arg version="${SHORT_SHA}-dev" --no-cache -t webserver .
docker tag webserver "ghcr.io/pacstall/webserver:$SHORT_SHA"
docker tag webserver ghcr.io/pacstall/webserver:development
- name: Push Images
run: |
docker push "ghcr.io/pacstall/webserver:$SHORT_SHA"
docker push ghcr.io/pacstall/webserver:development