build: update

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-08-05 12:31:09 +02:00
parent 7685e2adcf
commit 4556a66f25
2 changed files with 12 additions and 7 deletions

View File

@ -1,14 +1,16 @@
--- ---
name: 'build go project' name: 'build go project'
on: [push] on:
workflow_dispatch:
push:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@main
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4

View File

@ -2,21 +2,24 @@
name: 'build images' name: 'build images'
on: on:
push: workflow_dispatch:
tags: inputs:
- '*' version:
description: "version"
required: false
type: string
jobs: jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@main
- name: Prepare - name: Prepare
id: prep id: prep
run: | run: |
DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/} DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/}
VERSION=${GITHUB_REF/refs\/tags\//} VERSION=${{ inputs.version }}
SHORTREF=${GITHUB_SHA::8} SHORTREF=${GITHUB_SHA::8}
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest" TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest"