Update build/deploy
This commit is contained in:
parent
a808a51c6d
commit
3cf66ab503
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@ -3,6 +3,10 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
@ -29,20 +33,23 @@ jobs:
|
|||||||
name: GitHub Container Registry
|
name: GitHub Container Registry
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: release
|
needs: release
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
run: echo ${{ secrets.GHCR_ACCESS_TOKEN }} | docker login ghcr.io -u luketainton --password-stdin
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
|
||||||
- name: Build image for GitHub Package Registry
|
- name: Build image for GitHub Package Registry
|
||||||
run: |
|
run: |
|
||||||
docker build . --file Dockerfile \
|
docker build . --file Dockerfile \
|
||||||
--build-arg "version=${{ needs.release.outputs.new_tag }}" \
|
--build-arg "version=${{ needs.release.outputs.new_tag }}" \
|
||||||
--tag ghcr.io/luketainton/roboluke-tasks:${{ needs.release.outputs.new_tag }} \
|
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release.outputs.new_tag }} \
|
||||||
--tag ghcr.io/luketainton/roboluke-tasks:latest
|
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||||
- name: Push image to GitHub Package Registry
|
- name: Push image to GitHub Package Registry
|
||||||
run: |
|
run: |
|
||||||
docker push ghcr.io/luketainton/roboluke-tasks:latest
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||||
docker push ghcr.io/luketainton/roboluke-tasks:${{ needs.release.outputs.new_tag }}
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release.outputs.new_tag }}
|
||||||
|
|
||||||
# deploy:
|
# deploy:
|
||||||
# name: Update Portainer Deployment
|
# name: Update Portainer Deployment
|
||||||
|
Loading…
Reference in New Issue
Block a user