-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |