Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump version up and update #12

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions .github/workflows/graphql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ on:
push:
branches:
- main
- develop
- 'release/*'

tags:
- '*'

# only test with local branch
pull_request:
branches:
- main
- develop
- 'release/*'

# Certain actions will only run when this is the main repo.
env:
MAIN_REPO: ncsa/standalone-smm-smile
MAIN_REPO: ncsa/standalone-smm-smile-graphql
DOCKERHUB_ORG: socialmediamacroscope
NCSAHUB: hub.ncsa.illinois.edu/socialmediamacroscope
PLATFORM: "linux/amd64"
Expand Down Expand Up @@ -62,18 +67,28 @@ jobs:
tags="$BRANCH"
fi

echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV

# should we push to dockerhub, and is there a README
DOCKERHUB_PUSH="false"
DOCKERHUB_README="false"
if [ "${{ github.repository }}" == "${{ env.MAIN_REPO }}" ]; then
if [ "${{ secrets.DOCKERHUB_USERNAME }}" != "" -a "${{ secrets.DOCKERHUB_PASSWORD }}" != "" ]; then
DOCKERHUB_PUSH="true"
if [ -e "README.md" ]; then
DOCKERHUB_README="true"
if [ ${BRANCH} == "main" ]; then
if [ "${{ secrets.DOCKERHUB_USERNAME }}" != "" -a "${{ secrets.DOCKERHUB_PASSWORD }}" != "" ]; then
DOCKERHUB_PUSH="true"
if [ -e "README.md" ]; then
DOCKERHUB_README="true"
fi
fi
fi
fi

# should we push to Github
GITHUB_PUSH="false"
if [ "${{ github.repository }}" == "${{ env.MAIN_REPO }}" ]; then
GITHUB_PUSH="true"
fi

# should we push to NCSA
NCSAHUB_PUSH="false"
if [ "${{ github.repository }}" == "${{ env.MAIN_REPO }}" ]; then
Expand All @@ -92,7 +107,9 @@ jobs:
if [ "$NCSAHUB_PUSH" == "true" ]; then
IMAGES="${IMAGES}${NCSAHUB}/${IMAGE}:${tag},"
fi
IMAGES="${IMAGES}ghcr.io/${OWNER_LC}/${IMAGE}:${tag},"
if [ "$GITHUB_PUSH" == "true" ]; then
IMAGES="${IMAGES}ghcr.io/${OWNER_LC}/${IMAGE}:${tag},"
fi
done
IMAGES="${IMAGES%,*}"

Expand All @@ -102,12 +119,14 @@ jobs:
echo "DOCKERHUB_README=${DOCKERHUB_README}"
echo "DOCKERHUB_PUSH=${DOCKERHUB_PUSH}"
echo "NCSAHUB_PUSH=${NCSAHUB_PUSH}"
echo "GITHUB_PUSH=${GITHUB_PUSH}"
echo "IMAGES=${IMAGES}"

echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "DOCKERHUB_README=${DOCKERHUB_README}" >> $GITHUB_ENV
echo "DOCKERHUB_PUSH=${DOCKERHUB_PUSH}" >> $GITHUB_ENV
echo "GITHUB_PUSH=${GITHUB_PUSH}" >> $GITHUB_ENV
echo "NCSAHUB_PUSH=${NCSAHUB_PUSH}" >> $GITHUB_ENV
echo "IMAGES=${IMAGES}" >> $GITHUB_ENV

Expand Down Expand Up @@ -152,6 +171,7 @@ jobs:

# build the docker images
- name: Build and push docker
if: env.DOCKERHUB_PUSH == 'true' || env.NCSAHUB_PUSH == 'true' || env.GITHUB_PUSH == 'true'
uses: docker/build-push-action@v3
with:
context: ./
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0] - 2024-01-23
### Added
- Github action for auto generating docker container [#4](https://github.com/ncsa/standalone-smm-smile-graphql/issues/4)

### Changed
- Github action goes to Docker Hub when it only releases a tag [#8](https://github.com/ncsa/standalone-smm-smile-graphql/issues/8)

## [0.2.8] - 2023-08-04
### Added
- Add support for Twitter V2 API [#2](https://github.com/ncsa/standalone-smm-smile-graphql/issues/2)
- Support for Twitter V2 API [#2](https://github.com/ncsa/standalone-smm-smile-graphql/issues/2)
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smile_graphql",
"version": "0.2.8",
"version": "0.3.0",
"private": true,
"scripts": {
"start": "forever ./bin/www",
Expand Down