Skip to content

Commit

Permalink
Use tags again
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilKWarmdahl committed Oct 21, 2024
1 parent 6875541 commit b0b26fd
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ name: Build and Push Database Exporter

on:
push:
branches:
- ekw/gh-actions/release
# tags:
# - "*.*.*-*"
tags:
- "*.*.*-*"

env:
UBUNTU_VERSION: '22.04'
RUST_IMAGE_TAG: '1.73.0'
S3_BUCKET: s3://eur2ccd.concordium.com
OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0_amd64.deb" #${{ github.ref_name }}_amd64.deb"
OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb"
IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd"

permissions:
Expand All @@ -26,7 +24,7 @@ jobs:
- name: Get the eur2ccd version
env:
TAG: ${{ github.ref_name }}
run: echo EUR2CCD_VERSION="0.6.1" >> $GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV
run: echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV

- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -48,6 +46,7 @@ jobs:
# Make sure the image does not exist. Abort if we can retrieve any metadata.
if [ ! "${{ env.EUR2CCD_VERSION }}" = "$VERSION" ]; then
echo "::error ${{ github.ref_name }} does not match ${{ env.SERVICE_NAME }}/${VERSION}."
exit 1
fi
- name: Check if version exist in s3
Expand All @@ -56,8 +55,7 @@ jobs:
totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}")
ec=$?
if [ $ec -ne "1" ]; then
echo "error: ${{env.OUTFILE}} already exists"
echo $ec
echo "error: ${{env.OUTFILE}} already exists or you do not have access"
exit 1
fi
Expand All @@ -70,4 +68,4 @@ jobs:
- name: Publish
run: |
# aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }}
aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }}

0 comments on commit b0b26fd

Please sign in to comment.