comment out ci for docker build action and improved docker build action

This commit is contained in:
mroxso 2023-08-15 21:55:38 +02:00
parent 7ade6bb56f
commit 4c28ea0f96

View File

@ -1,18 +1,23 @@
name: Docker Build and Push name: Docker Build and Push
on: on:
workflow_dispatch:
push: push:
branches: branches:
- main - main
- master - master
env:
REGISTRY_NAME: ghcr.io
IMAGE_NAME: nostr-rs-relay
jobs: jobs:
ci: # ci:
name: CI # name: CI
uses: ./.github/workflows/ci.yml # uses: ./.github/workflows/ci.yml
build_and_push: build_and_push:
needs: [ci] # needs: [ci]
name: Build and Push name: Build and Push
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -32,13 +37,29 @@ jobs:
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push - name: Collecting Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY_NAME }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
- name: Building And Pushing Image
id: docker_build id: docker_build
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
context: . context: .
file: ./Dockerfile
push: true push: true
tags: ghcr.io/${{ github.repository_owner }}/nostr-rs-relay:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v4
# with:
# context: .
# push: true
# tags: ghcr.io/${{ github.repository_owner }}/nostr-rs-relay:latest
- name: Image digest - name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }} run: echo ${{ steps.docker_build.outputs.digest }}