Skip to content

Commit 212e9be

Browse files
authored
Revert "add build and push to ghcr similar to danger"
1 parent 69e5062 commit 212e9be

File tree

1 file changed

+14
-33
lines changed

1 file changed

+14
-33
lines changed

.github/workflows/publish_package.yml

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,27 @@ name: Release Danger-JS package
22

33
on:
44
push:
5-
branches:
6-
- 'master'
75
tags:
86
- '*'
97

10-
env:
11-
REGISTRY: ghcr.io
12-
IMAGE_NAME: ${{ github.repository }}
13-
148
jobs:
159
build:
16-
runs-on: ubuntu-latest
17-
permissions:
18-
contents: read
19-
packages: write
10+
runs-on: ubuntu-20.04
2011

2112
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v3
13+
- uses: actions/checkout@v3
14+
15+
- name: Export tag version
16+
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
2417

25-
- name: Log in to the Container registry
26-
uses: docker/login-action@v2
27-
with:
28-
registry: ${{ env.REGISTRY }}
29-
username: ${{ github.actor }}
30-
password: ${{ secrets.GITHUB_TOKEN }}
18+
- name: Docker Login
19+
run: echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
20+
env:
21+
PACKAGES_WRITE_TOKEN: ${{ secrets.DOCKER_GITHUB_PASSWORD }}
22+
USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}
3123

32-
- name: Set up Docker metadata
33-
id: meta
34-
uses: docker/metadata-action@v4
35-
with:
36-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37-
tags: |
38-
type=ref,event=branch
39-
type=ref,event=tag
24+
- name: Docker Build
25+
run: docker build -t ghcr.io/danger/danger-js:$VERSION .
4026

41-
- name: Build and push Docker image
42-
uses: docker/build-push-action@v4
43-
with:
44-
context: .
45-
push: true
46-
tags: ${{ steps.meta.outputs.tags }}
47-
labels: ${{ steps.meta.outputs.labels }}
27+
- name: Deploy
28+
run: docker push ghcr.io/danger/danger-js:$VERSION

0 commit comments

Comments
 (0)