Skip to content

Commit

Permalink
use set output
Browse files Browse the repository at this point in the history
  • Loading branch information
jasminabrar committed Dec 15, 2023
1 parent 964be10 commit 8921e53
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/Docker_Image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,32 @@ jobs:
sudo apt-get update -y
sudo apt-get install jq -y
- name: get latest version of siepic ebeam pdk and siepic tools
id: get-version
- name: get latest version of siepic ebeam pdk
id: ebeampdk
run: |
# Get the latest release version from the target repository
EBEAM_PDK=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/SiEPIC/SiEPIC_EBeam_PDK/releases/latest" \
| jq -r .tag_name)
TOOLS=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
echo "$EBEAM_PDK"
#echo "EBEAM_PDK=$EBEAM_PDK" >> $GITHUB_ENV
echo "::set-output name=ebeampdk::${EBEAM_PDK}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: get latest version of siepic tools
id: siepictools
run: |
SIEPIC_TOOLS=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/SiEPIC/SiEPIC-Tools/releases/latest" \
| jq -r .tag_name)
echo "$EBEAM_PDK, $TOOLS"
echo "EBEAM_PDK=$EBEAM_PDK" >> $GITHUB_ENV
echo "TOOLS=$TOOLS" >> $GITHUB_ENV
echo "$TOOLS"
#echo "TOOLS=$TOOLS" >> $GITHUB_ENV
echo "::set-output name=siepictools::${SIEPIC_TOOLS}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -89,13 +100,13 @@ jobs:
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}-latest-"$EBEAM_PDK"
tags: ${{ steps.meta.outputs.tags }}-latest
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push Docker image as unique image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: "${{ steps.meta.outputs.tags }}.${{ steps.date.outputs.date }}.${{ github.run_number }}"
tags: "${{ steps.meta.outputs.tags }}.${{ steps.ebeampdk.outputs.ebeampdk }}.${{ steps.siepictools.outputs.siepictools}}"
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 8921e53

Please sign in to comment.