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

Update workflow files to eliminate deprecated github action features #47

Merged
merged 1 commit into from
Feb 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
12 changes: 6 additions & 6 deletions .github/workflows/buildMedleyDocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
steps:
# Checkout the actions for this repo_owner
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
Expand All @@ -73,7 +73,7 @@ jobs:
# Fetch cached LFS files
- name: Cache LFS files
id: cache-lfs
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
docker_medley/filebrowser/filebrowser
Expand All @@ -88,7 +88,7 @@ jobs:

# Checkout latest commit
- name: Checkout Online code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: ${{ steps.cache-lfs.outputs.cache-hit != 'true' }}

Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:

# Checkout the latest Notecards commit
- name: Checkout Notecards
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: "${{ github.repository_owner }}/notecards"
path: "./docker_medley/notecards"
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:

# Login to ghcr.io
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -210,7 +210,7 @@ jobs:
# checked out and the release tars just downloaded.
# Push the result to Docker Hub
- name: Build Docker Image for Push to Docker Hub
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: |
Expand Down
37 changes: 18 additions & 19 deletions .github/workflows/buildPortalDocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ jobs:
- id: platform
run: >
if [ '${{ toJSON(inputs) }}' = 'null' ];
then echo ::set-output name=platform::'${{ github.event.inputs.platform }}';
else echo ::set-output name=platform::'${{ inputs.platform }}';
then echo "platform=${{ github.event.inputs.platform }}" >> ${GITHUB_OUTPUT};
else echo "platform=${{ inputs.platform }}" >> ${GITHUB_OUTPUT};
fi


# Build and push the docker image

build_and-push:
Expand All @@ -74,15 +73,15 @@ jobs:

# Checkout the actions for this repo_owner
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}

# Checkout latest commit to depth 1 for production
- name: Checkout Web-portal code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand All @@ -96,30 +95,30 @@ jobs:
id: docker_env
run: |
DOCKER_REGISTRY="ghcr.io/"
echo ::set-output name=docker_registry::${DOCKER_REGISTRY}
echo "docker_registry=${DOCKER_REGISTRY}" >> ${GITHUB_OUTPUT}
DOCKER_NAMESPACE=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')
echo "DOCKER_NAMESPACE=${DOCKER_NAMESPACE}" >> ${GITHUB_ENV}
echo ::set-output name=docker_namespace::${DOCKER_NAMESPACE}
echo "docker_namespace=${DOCKER_NAMESPACE}" >> ${GITHUB_OUTPUT}
#
DOCKER_REPO_PROD=${DOCKER_REGISTRY}${DOCKER_NAMESPACE}/${{ steps.tag.outputs.repo_name }}-production
DOCKER_TAGS_PROD="${DOCKER_REPO_PROD}:latest,${DOCKER_REPO_PROD}:${RELEASE_TAG#*-}"
DOCKER_REPO_DEV=${DOCKER_REGISTRY}${DOCKER_NAMESPACE}/${{ steps.tag.outputs.repo_name }}-development
DOCKER_TAGS_DEV="${DOCKER_REPO_DEV}:latest,${DOCKER_REPO_DEV}:${RELEASE_TAG#*-}"
echo ::set-output name=build_time::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=docker_tags_prod::${DOCKER_TAGS_PROD}
echo ::set-output name=docker_tags_dev::${DOCKER_TAGS_DEV}
echo "build_time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_OUTPUT}
echo "docker_tags_prod=${DOCKER_TAGS_PROD}" >> ${GITHUB_OUTPUT}
echo "docker_tags_dev=${DOCKER_TAGS_DEV}" >> ${GITHUB_OUTPUT}

# Setup the Docker Machine Emulation environment.
- name: Set up QEMU
if: ${{ needs.inputs.outputs.platform == 'linux/arm64' }}
uses: docker/setup-qemu-action@master
uses: docker/setup-qemu-action@v3
with:
platforms: linux/arm64

# Setup the Docker Buildx funtion
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
uses: docker/setup-buildx-action@v3

# Online now uses github container registry instead of dockerhub
# Login into DockerHub - required to store the created image
Expand All @@ -131,7 +130,7 @@ jobs:

# Login to ghcr.io
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -144,7 +143,7 @@ jobs:

# Get novnc
- name: Checkout novnc code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'novnc/noVNC.git'
ref: 'v1.3.0'
Expand All @@ -153,7 +152,7 @@ jobs:
# Do the Production Docker Build using the Dockerfile_production
# Push the result to Docker Hub
- name: Build Docker Image for Push to Docker Hub
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: |
Expand All @@ -167,7 +166,7 @@ jobs:

# Recheckout latest commit with fetch_depth of 0 for development image
- name: Checkout Web-portal code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -178,7 +177,7 @@ jobs:

# Get novnc
- name: Checkout novnc code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'novnc/noVNC.git'
ref: 'v1.3.0'
Expand All @@ -187,7 +186,7 @@ jobs:
# Do the Development Docker Build using the Dockerfile_development
# Push the result to Docker Hub
- name: Build Docker Image for Push to Docker Hub
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: |
Expand All @@ -200,4 +199,4 @@ jobs:
push: true
tags: ${{ steps.docker_env.outputs.docker_tags_dev }}