Skip to content

Commit abcdd20

Browse files
committed
+changelog-ignore: github action
1 parent a7abcd4 commit abcdd20

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Build
2+
run-name: Build ${{ github.repository }}
23
on:
34
pull_request:
45
branches: "*"

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Release
2+
run-name: Release ${{ github.repository }}
23
on:
34
pull_request:
45
branches: [ "main" ]

.github/workflows/template.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
DOCKER_USERNAME: ${{ secrets.docker-username }}
2525
DOCKER_PASSWORD: ${{ secrets.docker-password }}
2626
DOCKER_IMAGE_PATH: ./build
27-
DOCKER_IMAGE_DEPLOY_PATH: ./deploy
27+
DOCKER_FILE_NAME: ${{ github.repository }}.tar
2828
ARTIFACT_NAME: docker-image
2929
jobs:
3030
determine-version:
@@ -69,7 +69,7 @@ jobs:
6969
tags: ${{ steps.meta.outputs.tags }}
7070
labels: ${{ steps.meta.outputs.labels }}
7171
file: ./Dockerfile
72-
outputs: type=docker,dest=${{ env.DOCKER_IMAGE_PATH }}
72+
outputs: type=docker,dest=${{ env.DOCKER_IMAGE_PATH }}/${{ env.DOCKER_FILE_NAME}}
7373
build-args: |
7474
BUILD_VERSION=${{ env.SEMVER }}
7575
- name: Upload artifact
@@ -84,25 +84,23 @@ jobs:
8484
- determine-version
8585
- build
8686
if: ${{ inputs.deploy == true }}
87+
env:
88+
DOWNLOAD_PATH: ./download
8789
steps:
8890
- name: Download artifact and push
8991
uses: actions/download-artifact@v2
9092
with:
9193
name: ${{ env.ARTIFACT_NAME }}
92-
path: ${{ env.DOCKER_IMAGE_DEPLOY_PATH }}
94+
path: ${{ env.DOWNLOAD_PATH }}
9395
- name: Login to Container Registry
9496
uses: docker/login-action@v1
9597
with:
9698
registry: ${{ env.DOCKER_REGISTRY }}
9799
username: ${{ env.DOCKER_USERNAME}}
98100
password: ${{ env.DOCKER_PASSWORD }}
99101
- run: |
100-
for file in ${{ env.DOCKER_IMAGE_DEPLOY_PATH }}/*.tar; do
101-
echo "Loading $file"
102-
docker load -i $file
103-
done
104-
echo "Pushing $DOCKER_IMAGE_NAME"
105-
docker push $DOCKER_IMAGE_NAME
102+
docker load -i ${{ env.DOWNLOAD_PATH }}/${{ env.DOCKER_FILE_NAME}}
103+
docker push ${{ env.DOCKER_IMAGE_NAME }}
106104
create-release:
107105
name: 🚀 create release
108106
needs:

0 commit comments

Comments
 (0)