Skip to content

Commit aafb36b

Browse files
push image to ghcr
1 parent fd85f25 commit aafb36b

6 files changed

Lines changed: 19 additions & 49 deletions

File tree

.github/FUNDING.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/cd_build_package.yml

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
echo ::set-output name=repo_name::$(echo ${GITHUB_REPOSITORY##*/})
2121
- name: Capture environment variables
2222
run: printenv
23-
- name: Login to DockerHub
24-
uses: docker/login-action@v1
23+
- uses: docker/login-action@v3
2524
with:
26-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
27-
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
2828
- name: Build
2929
id: build_and_push
3030
uses: docker/build-push-action@v2
@@ -34,33 +34,10 @@ jobs:
3434
STEP_2_IMAGE=alpine:3.12
3535
file: build/docker/Dockerfile
3636
tags: |
37-
bryannice/gitactions-slack-notification:latest
38-
bryannice/gitactions-slack-notification:${{ steps.get_tag_name.outputs.tag_name }}
39-
- name: Push to docker hub
37+
ghcr.io/bunnyway/gitactions-slack-notification:${{ github.sha }}
38+
ghcr.io/bunnyway/gitactions-slack-notification:latest
39+
ghcr.io/bunnyway/gitactions-slack-notification:${{ steps.get_tag_name.outputs.tag_name }}
40+
- name: Push to GHCR
4041
run: |
41-
docker push bryannice/gitactions-slack-notification:latest
42-
docker push bryannice/gitactions-slack-notification:${{ steps.get_tag_name.outputs.tag_name }}
43-
- name: Update Docker Hub Description
44-
uses: peter-evans/dockerhub-description@v2.4.1
45-
if: success()
46-
with:
47-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
48-
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
49-
repository: bryannice/gitactions-slack-notification
50-
readme-filepath: README.md
51-
logPullCiBuildDockerImage:
52-
needs: pushCiBuildDockerImage
53-
if: always()
54-
runs-on: ubuntu-latest
55-
steps:
56-
- name: Generate log file
57-
run: |
58-
curl -v -L -u runner:${{ secrets.GITHUB_TOKEN }} -o job_info.json https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${{ github.run_id }}/jobs
59-
curl -v -L -u runner:${{ secrets.GITHUB_TOKEN }} -o build_logs.txt $(cat job_info.json | jq --raw-output '.jobs | .[0] | .url')/logs
60-
- name: Persisting log
61-
id: persisting_log
62-
if: always()
63-
uses: actions/upload-artifact@v1
64-
with:
65-
name: workflow_log
66-
path: build_logs.txt
42+
docker push ghcr.io/bunnyway/gitactions-slack-notification:latest
43+
docker push ghcr.io/bunnyway/gitactions-slack-notification:${{ steps.get_tag_name.outputs.tag_name }}

CHANGELOG.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
[markdownlint](https://dlaa.me/markdownlint/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9-
## [2.0.0] - 2021-01-10
9+
## Unreleased
1010

11-
### Added to 2.0.0
12-
13-
- Updated to use news alpine version 3.12
14-
- Updated golang to 1.15.6
15-
- Modify variable naming from SLACK_WEBHOOK to SLACK_INCOMING_WEBHOOK
16-
- Added work flow build logic to push to docker hub
11+
- Forked from [bryannice/gitactions-slack-notification](https://github.com/bryannice/gitactions-slack-notification);
12+
- Push image to GitHub Registry Container;

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Slack Notification
22

3-
Git Action to send messages to Slack. This action can be used to send message about the status of a Git Action workflow.
3+
Git Action to send messages to Slack. This action can be used to send message about the status of a Git Action workflow.
44

5-
## Usage
5+
## Usage
66

77
This action can be used after any other action. Below is simple example on using it:
88

@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@master
2222
- name: Slack Notification Demo
23-
uses: bryannice/gitactions-slack-notification@2.0.0
23+
uses: bunnyway/gitactions-slack-notification@0.1.0
2424
env:
2525
SLACK_INCOMING_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK }}
2626
SLACK_MESSAGE: 'Demo''ing the Slack Notification'
@@ -31,7 +31,7 @@ Go [here](deployment/git-actions/template_slack_notification.yml) for a template
3131
3232
3\. Generate Slack WebHook [here](https://entelexeia.slack.com/apps/A0F7XDUAZ-incoming-webhooks?next_id=0)
3333
34-
4\. Encrypt Slack Webhook as a secret in the repo using this app.
34+
4\. Encrypt Slack Webhook as a secret in the repo using this app.
3535
3636
3737

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ branding:
66
color: 'purple'
77
runs:
88
using: 'docker'
9-
image: 'docker://bryannice/gitactions-slack-notification:2.0.0'
9+
image: 'docker://ghcr.io/bunnyway/gitactions-slack-notification:0.1.0'

deployment/git-actions/template_slack_notification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- uses: actions/checkout@master
99
- name: Slack Notification Demo
10-
uses: bryannice/gitactions-slack-notification@2.0.0
10+
uses: bunnyway/gitactions-slack-notification@0.1.0
1111
env:
1212
GITHUB_ACTOR: ${GITHUB_ACTOR}
1313
GITHUB_ACTION: ${GITHUB_ACTION}

0 commit comments

Comments
 (0)