Change docker-publish workflow
Some checks failed
Build and Publish / build_and_publish (push) Has been cancelled

This commit is contained in:
Nexus 2024-06-12 00:16:50 +01:00
parent d989a73dee
commit 30018f41d3
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -1,9 +1,6 @@
name: Build and Publish college-bot-v2 name: Build and Publish
run-name: Build and Publish college-bot-v2 run-name: Build and Publish
on: on: [push]
push:
branches:
- 'master'
jobs: jobs:
build_and_publish: build_and_publish:
@ -11,24 +8,28 @@ jobs:
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Build Docker image
run: | - name: Set up Docker Buildx
docker build -t git.i-am.nexus/nex/college-bot:latest -t ghcr.io/nexy7574/college-bot:latest . 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 - name: Log into forgejo CR
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.i-am.nexus registry: git.i-am.nexus
username: nex username: nex
password: ${{ secrets.CR_PASSWORD }} password: ${{ secrets.CR_PASSWORD }}
- name: Push to forgejo CR
run: | - name: Build and push
docker push git.i-am.nexus/nex/college-bot:latest uses: docker/build-push-action@v5
- name: Log into GHCR
uses: docker/login-action@v3
with: with:
registry: ghcr.io context: .
username: nexy7574 push: ${{ github.event_name != 'pull_request' }}
password: ${{ secrets.GHCR_PASSWORD }} tags: ${{ steps.meta.outputs.tags }}
- name: Push to GHCR labels: ${{ steps.meta.outputs.labels }}
run: |
docker push ghcr.io/nexy7574/college-bot:latest