Change docker-publish workflow
Some checks failed
Build and Publish / build_and_publish (push) Has been cancelled
Some checks failed
Build and Publish / build_and_publish (push) Has been cancelled
This commit is contained in:
parent
d989a73dee
commit
30018f41d3
1 changed files with 21 additions and 20 deletions
|
@ -1,9 +1,6 @@
|
|||
name: Build and Publish college-bot-v2
|
||||
run-name: Build and Publish college-bot-v2
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
name: Build and Publish
|
||||
run-name: Build and Publish
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build_and_publish:
|
||||
|
@ -11,24 +8,28 @@ jobs:
|
|||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build -t git.i-am.nexus/nex/college-bot:latest -t ghcr.io/nexy7574/college-bot:latest .
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: git.i-am.nexus/nex/college-bot-v2
|
||||
|
||||
- name: Log into forgejo CR
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.i-am.nexus
|
||||
username: nex
|
||||
password: ${{ secrets.CR_PASSWORD }}
|
||||
- name: Push to forgejo CR
|
||||
run: |
|
||||
docker push git.i-am.nexus/nex/college-bot:latest
|
||||
- name: Log into GHCR
|
||||
uses: docker/login-action@v3
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: nexy7574
|
||||
password: ${{ secrets.GHCR_PASSWORD }}
|
||||
- name: Push to GHCR
|
||||
run: |
|
||||
docker push ghcr.io/nexy7574/college-bot:latest
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
Loading…
Reference in a new issue