Skip to content

Commit

Permalink
Update workflow_dispatch.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jonstout authored Nov 8, 2024
1 parent cd72f50 commit b9cbc0b
Showing 1 changed file with 44 additions and 40 deletions.
84 changes: 44 additions & 40 deletions .github/workflows/workflow_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,51 @@ jobs:
steps:
- name: Copy repository to /github/workspace
uses: actions/checkout@v3
- name: Build tsds-services
uses: ./
- name: Archive RPM
uses: actions/upload-artifact@v2
with:
name: grnoc-tsds-services-${{ env.version }}-1.x86_64.rpm
path: grnoc-tsds-services-*.el8.x86_64.rpm
- name: Lookup version number
run: |
TAG=$(grep "our $$VERSION" lib/GRNOC/TSDS.pm | awk '{print $$4}' | sed "s/['|;]//g")
echo $TAG
# - name: Build tsds-services
# uses: ./
# - name: Archive RPM
# uses: actions/upload-artifact@v2
# with:
# name: grnoc-tsds-services-${{ env.version }}-1.x86_64.rpm
# path: grnoc-tsds-services-*.el8.x86_64.rpm

tsds_container:
runs-on: self-hosted
name: Build container
steps:
- name: Login to Docker
uses: docker/[email protected]
with:
registry: ${{ vars.REPOSITORY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# tsds_container:
# runs-on: self-hosted
# name: Build container
# steps:
# - name: Login to Docker
# uses: docker/[email protected]
# with:
# registry: ${{ vars.REPOSITORY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Configure Docker metadata
id: meta
uses: docker/metadata-action@v4
env:
IMAGE_NAME: ${{ vars.REPOSITORY }}/${{ github.repository }}
REGISTRY: ${{ vars.REPOSITORY }}
with:
images: ${{ vars.REPOSITORY }}/${{ github.repository }}
tags: |
type=raw,value=${{ env.version }}
# - name: Configure Docker metadata
# id: meta
# uses: docker/metadata-action@v4
# env:
# IMAGE_NAME: ${{ vars.REPOSITORY }}/${{ github.repository }}
# REGISTRY: ${{ vars.REPOSITORY }}
# with:
# images: ${{ vars.REPOSITORY }}/${{ github.repository }}
# tags: |
# type=raw,value=${{ env.version }}

- name: Save image tag
id: set_image_name
run: |
TAG=$(echo $DOCKER_METADATA_OUTPUT_TAGS | cut -d ' ' -f1)
echo $TAG
echo "tag=$TAG" >> $GITHUB_OUTPUT
# - name: Save image tag
# id: set_image_name
# run: |
# TAG=$(echo $DOCKER_METADATA_OUTPUT_TAGS | cut -d ' ' -f1)
# echo $TAG
# echo "tag=$TAG" >> $GITHUB_OUTPUT

- name: Build and push image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# - name: Build and push image
# uses: docker/[email protected]
# with:
# context: .
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}

0 comments on commit b9cbc0b

Please sign in to comment.