Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Adaptation for staging pipeline (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitt3120 authored Jun 13, 2023
1 parent 32916a5 commit 6ab7f4c
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Build and deploy release
name: GitHub & Docker Artifacts

on:
push:
branches: ["staging"]

jobs:
deploy:
deploy_github_artifact:
name: Deploy GitHub Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout project
Expand All @@ -25,4 +26,20 @@ jobs:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: COMMIT_HASH=$(git rev-parse --short "$GITHUB_SHA") && gh release create "$COMMIT_HASH" --repo="$GITHUB_REPOSITORY" --title="${GITHUB_REPOSITORY#*/} Beta ${COMMIT_HASH}" \./portal.zip --generate-notes --latest --prerelease
run: COMMIT_HASH=$(git rev-parse --short "$GITHUB_SHA") && gh release create "$COMMIT_HASH" --repo="$GITHUB_REPOSITORY" --title="${GITHUB_REPOSITORY#*/} Beta ${COMMIT_HASH}" \./portal.zip --generate-notes --prerelease
deploy_dockerhub_artifact:
name: Deploy DockerHub Artifact
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/portal:beta,${{ secrets.DOCKERHUB_USERNAME }}/portal:${{ github.sha }}

0 comments on commit 6ab7f4c

Please sign in to comment.