Skip to content

Commit

Permalink
ci: fixing broken release
Browse files Browse the repository at this point in the history
  • Loading branch information
isindir committed Feb 7, 2024
1 parent a90a73c commit 8a769a0
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,46 @@ jobs:
run: |
VERSION=$(make image_tag)
echo "SOPS_SEC_OPERATOR_VERSION=$VERSION" >> $GITHUB_ENV
SKIP_RELEASE=$(git tag -l "${SOPS_SEC_OPERATOR_VERSION}")
SKIP_RELEASE=$(git tag -l "${VERSION}")
echo "IMAGE_FULL_NAME=$(make image_full_name)" >> $GITHUB_ENV
echo "IMAGE_LATEST_NAME=$(make image_latest_name)" >> $GITHUB_ENV
echo "IMAGE_CACHE_NAME=$(make image_cache_name)" >> $GITHUB_ENV
echo "SKIP_RELEASE=$SKIP_RELEASE" >> $GITHUB_ENV
echo "SKIP_RELEASE=${SKIP_RELEASE}" >> $GITHUB_ENV
- name: Install asdf tools
- name: Skip release
if: env.SKIP_RELEASE != ''
run: |
echo "Skip release, tag found for ${VERSION}"
- name: Install asdf tools
if: env.SKIP_RELEASE == ''
uses: asdf-vm/actions/install@v2

- name: install hub
if: env.SKIP_RELEASE != ''
if: env.SKIP_RELEASE == ''
run: |
curl -sSLO https://github.com/github/hub/releases/download/v${HUB_VERSION}/hub-linux-amd64-${HUB_VERSION}.tgz
tar -xzf hub-linux-amd64-${HUB_VERSION}.tgz
chmod +x hub-linux-amd64-${HUB_VERSION}/bin/hub
sudo mv hub-linux-amd64-${HUB_VERSION}/bin/hub /usr/local/bin/
- name: Set up QEMU
if: env.SKIP_RELEASE != ''
if: env.SKIP_RELEASE == ''
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
if: env.SKIP_RELEASE != ''
if: env.SKIP_RELEASE == ''
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: env.SKIP_RELEASE != ''
if: env.SKIP_RELEASE == ''
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Tag and release
if: env.SKIP_RELEASE != ''
if: env.SKIP_RELEASE == ''
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
Expand All @@ -71,7 +76,7 @@ jobs:
hub release create -F chglog.tmp "${SOPS_SEC_OPERATOR_VERSION}"
- name: Docker build
if: env.SKIP_RELEASE != ''
if: env.SKIP_RELEASE == ''
uses: docker/build-push-action@v5
with:
context: .
Expand Down

0 comments on commit 8a769a0

Please sign in to comment.