Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7be52a79d6 | |||
| 5f2e956e80 | |||
| 242137d421 | |||
| 0c2b7ae461 | |||
| bb4d1439cf | |||
| d8b07d11a1 |
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@@ -4,18 +4,30 @@ on:
|
|||||||
tags: '*'
|
tags: '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
prepare-data:
|
||||||
|
name: Prepare Data
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
tag: ${{ steps.prepare.outputs.SOURCE_TAG }}
|
||||||
|
steps:
|
||||||
|
- id: prepare
|
||||||
|
name: Prepare environment variables
|
||||||
|
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
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare-data]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Login to GitHub Package Registry
|
- name: Login to GitHub Package Registry
|
||||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u luketainton --password-stdin
|
run: echo ${{ secrets.PAT }} | docker login ghcr.io -u luketainton --password-stdin
|
||||||
- name: Build image for GitHub Package Registry
|
- name: Build image for GitHub Package Registry
|
||||||
run: |
|
run: docker build . --file Dockerfile --tag ghcr.io/luketainton/ipilot:${{ needs.prepare-data.outputs.tag }} --tag ghcr.io/luketainton/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
|
|
||||||
- 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 ghcr.io/luketainton/ipilot:latest
|
||||||
docker push docker.pkg.github.com/luketainton/ipilot/ipilot:$GITHUB_REF
|
docker push ghcr.io/luketainton/ipilot:${{ needs.prepare-data.outputs.tag }}
|
||||||
|
|||||||
Reference in New Issue
Block a user