Skip to content

Commit

Permalink
TEMP: TESET
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadlone committed Jan 20, 2024
1 parent 662e943 commit ac90ebb
Showing 1 changed file with 19 additions and 43 deletions.
62 changes: 19 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
name: Release workflow

on:
workflow_dispatch:
inputs:
tag:
description: 'New tag name'
required: true
push:

permissions:
contents: write
Expand Down Expand Up @@ -49,22 +45,18 @@ jobs:

- name: Set up QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v2
shell: bash
run: echo "sha_short=$(echo Hi1)" >> ${GITHUB_ENV}

- name: Log in to Docker Hub
if: matrix.os == 'ubuntu-latest'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
shell: bash
run: echo "sha_short=$(echo Hi2)" >> ${GITHUB_ENV}

- name: Log in to the Container registry
if: matrix.os == 'ubuntu-latest'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: echo "sha_short=$(echo Hi3)" >> ${GITHUB_ENV}

- name: Run command to get SHA environment
shell: bash
Expand Down Expand Up @@ -93,15 +85,8 @@ jobs:
enableCrossOsArchive: true

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
version: latest
args: release --clean --split ${{ env.flags }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
shell: bash
run: echo "sha_short=$(echo HiRunnReleaser)" >> ${GITHUB_ENV}

release:
runs-on: ubuntu-latest
Expand All @@ -123,10 +108,8 @@ jobs:
cache: true

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
shell: bash
run: echo "sha_short=$(echo Hi11)" >> ${GITHUB_ENV}

- name: Run command to get SHA environment
shell: bash
Expand Down Expand Up @@ -166,15 +149,8 @@ jobs:
run: exit 1

- name: Do the release, only if all OS caches were restored
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
version: latest
args: continue --merge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
shell: bash
run: echo "sha_short=$(echo Hi22)" >> ${GITHUB_ENV}

pull-docker-image:
name: Pull docker image job
Expand All @@ -190,13 +166,13 @@ jobs:

steps:
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
shell: bash
run: echo "sha_short=$(echo Hi33)" >> ${GITHUB_ENV}

- name: Pull Docker image
run: docker pull ${{ matrix.image_tag }}
shell: bash
run: echo "sha_short=$(echo Hi44)" >> ${GITHUB_ENV}

- name: Test Docker image
run: docker run --rm ${{ matrix.image_tag }}
shell: bash
run: echo "sha_short=$(echo Hi55)" >> ${GITHUB_ENV}

0 comments on commit ac90ebb

Please sign in to comment.