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 - name: Set up Docker Buildx
uses: docker/login-action@v2 uses: docker/setup-buildx-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push - name: Login to GitHub Container Registry
uses: docker/build-push-action@v4 uses: docker/login-action@v1
with: with:
context: . registry: ghcr.io
push: true username: ${{ github.actor }}
tags: ghcr.io/marcus7i/ulinkshortener:latest password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/marcus7i/ulinkshortener:latest