This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding workflow to publish release Dockerfile to GH registry.
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: dev-deploy | ||
on: | ||
push: | ||
branches: | ||
[dev] | ||
jobs: | ||
dev-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
- name: Build Docker Image | ||
run: bash scripts/build_docker.sh dev $DOCKER_LABEL | ||
env: | ||
DOCKER_LABEL: ${{ secrets.DOCKER_LABEL }} | ||
REPO_NAME: ${{ secrets.REPO_NAME }} | ||
ECR_URL: ${{ secrets.ECR_URL }} | ||
- name: Publish to GitHub Container Packages | ||
run: bash scripts/publish_gh_container.sh ${{ github.event.release.tag_name }} $DOCKER_LABEL | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_USERNAME: ${{ github.actor }} | ||
DOCKER_LABEL: ${{ secrets.DOCKER_LABEL }} | ||
- name: Job succeeded | ||
if: always() | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 # Not needed with a .ruby-version file | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
env: | ||
JOB_STATUS: ${{ job.status }} | ||
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} | ||
HOOK_OS_NAME: ${{ runner.os }} | ||
WORKFLOW_NAME: ${{ github.workflow }} | ||
run: | | ||
git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook | ||
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
|
||
TAG=$1 | ||
LABEL=$2 | ||
|
||
echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_USERNAME" --password-stdin | ||
|
||
docker tag ${LABEL} ${LABEL}:${TAG} | ||
docker push ${LABEL}:${TAG} |