Skip to content

Commit

Permalink
disable github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
caruccio committed Aug 26, 2024
1 parent a60cc58 commit b0f5920
Showing 1 changed file with 57 additions and 57 deletions.
114 changes: 57 additions & 57 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
name: Build and Release

on:
workflow_dispatch:
push:
tags:
- "v*.*.*"

permissions:
packages: write
contents: read

env:
REGISTRY: ghcr.io
IMAGE: ghcr.io/${{ github.repository }}

jobs:
build-and-release:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set variables
id: prep
run: |-
echo VERSION=$(cat version.txt) >> $GITHUB_ENV
echo RELEASE=v$(cat version.txt) >> $GITHUB_ENV
echo GIT_COMMIT=${GITHUB_SHA:0:7} >> $GITHUB_ENV
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: build
uses: docker/build-push-action@v4
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
file: Dockerfile
push: true
build-args: |
VERSION=${{ env.VERSION }}
RELEASE=${{ env.RELEASE }}
GIT_COMMIT=${{ env.GIT_COMMIT}}
tags: ${{ env.IMAGE }}:latest,${{ env.IMAGE }}:${{ env.RELEASE }}
cache-from: type=gha
cache-to: type=gha,mode=max
#name: Build and Release
#
#on:
# workflow_dispatch:
# push:
# tags:
# - "v*.*.*"
#
#permissions:
# packages: write
# contents: read
#
#env:
# REGISTRY: ghcr.io
# IMAGE: ghcr.io/${{ github.repository }}
#
#jobs:
# build-and-release:
# name: Build and Release
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Set variables
# id: prep
# run: |-
# echo VERSION=$(cat version.txt) >> $GITHUB_ENV
# echo RELEASE=v$(cat version.txt) >> $GITHUB_ENV
# echo GIT_COMMIT=${GITHUB_SHA:0:7} >> $GITHUB_ENV
#
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@master
#
# - name: Login to GHCR
# uses: docker/login-action@v2
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Build and push
# id: build
# uses: docker/build-push-action@v4
# with:
# context: .
# builder: ${{ steps.buildx.outputs.name }}
# file: Dockerfile
# push: true
# build-args: |
# VERSION=${{ env.VERSION }}
# RELEASE=${{ env.RELEASE }}
# GIT_COMMIT=${{ env.GIT_COMMIT}}
# tags: ${{ env.IMAGE }}:latest,${{ env.IMAGE }}:${{ env.RELEASE }}
# cache-from: type=gha
# cache-to: type=gha,mode=max

0 comments on commit b0f5920

Please sign in to comment.