Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d8b07d11a1 | |||
| 3e75a5b445 |
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -1,12 +1,25 @@
|
|||||||
name: Build
|
name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: *
|
tags: '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
prepare:
|
||||||
|
name: Prepare Data
|
||||||
|
id: prepare
|
||||||
|
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:
|
build:
|
||||||
name: GitHub Package Registry
|
name: GitHub Package Registry
|
||||||
|
id: ghpr
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
SOURCE_NAME: ${{ steps.prepare.outputs.SOURCE_NAME }}
|
||||||
|
SOURCE_BRANCH: ${{ steps.prepare.outputs.SOURCE_BRANCH }}
|
||||||
|
SOURCE_TAG: ${{ steps.prepare.outputs.SOURCE_TAG }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Login to GitHub Package Registry
|
- name: Login to GitHub Package Registry
|
||||||
@@ -14,8 +27,8 @@ jobs:
|
|||||||
- name: Build image for GitHub Package Registry
|
- name: Build image for GitHub Package Registry
|
||||||
run: |
|
run: |
|
||||||
docker build . --file Dockerfile --tag docker.pkg.github.com/luketainton/ipilot/ipilot:latest
|
docker build . --file Dockerfile --tag docker.pkg.github.com/luketainton/ipilot/ipilot:latest
|
||||||
docker build . --file Dockerfile --tag docker.pkg.github.com/luketainton/ipilot/ipilot:$GITHUB_REF
|
docker build . --file Dockerfile --tag docker.pkg.github.com/luketainton/ipilot/ipilot:$SOURCE_TAG
|
||||||
- name: Push image to GitHub Package Registry
|
- name: Push image to GitHub Package Registry
|
||||||
run: |
|
run: |
|
||||||
docker push docker.pkg.github.com/luketainton/ipilot/ipilot:latest
|
docker push docker.pkg.github.com/luketainton/ipilot/ipilot:latest
|
||||||
docker push docker.pkg.github.com/luketainton/ipilot/ipilot:$GITHUB_REF
|
docker push docker.pkg.github.com/luketainton/ipilot/ipilot:$SOURCE_TAG
|
||||||
|
|||||||
Reference in New Issue
Block a user