Updated github workflow

This commit is contained in:
MarcUs7i 2025-02-21 02:53:58 +01:00
parent c97565465d
commit abe6ade85e

View file

@ -2,24 +2,33 @@ name: Build on Release
on: on:
release: release:
types: [published] types: [created]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps: steps:
- uses: actions/checkout@v3 - name: Checkout code
uses: actions/checkout@v2
- name: Log in to GHCR
uses: docker/login-action@v2 - name: Set up Docker Buildx
with: uses: docker/setup-buildx-action@v1
registry: ghcr.io
username: ${{ github.actor }} - name: Login to GitHub Container Registry
password: ${{ secrets.GITHUB_TOKEN }} uses: docker/login-action@v1
with:
- name: Build and push registry: ghcr.io
uses: docker/build-push-action@v4 username: ${{ github.actor }}
with: password: ${{ secrets.GITHUB_TOKEN }}
context: .
push: true - name: Build and push Docker image
tags: ghcr.io/marcus7i/ulinkshortener:latest uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/marcus7i/ulinkshortener:latest