Skip to content

Commit 92f18a5

Browse files
Merge pull request #6 from weierophinney/hotfix/build-simplification
Simplify workflow for building container
2 parents e7723c1 + e64b5d7 commit 92f18a5

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/build-and-push-containers.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,40 @@ on:
55
types: [published]
66

77
jobs:
8-
tags:
8+
release-contaienr:
99
runs-on: ubuntu-latest
10-
outputs:
11-
tags: ${{ steps.tags.outputs.tags }}
1210
steps:
1311
- name: Compile tag list
1412
id: tags
1513
run: |
1614
TAG=${GITHUB_REF/refs\/tags\//}
17-
PREFIX=ghcr.io/laminas/laminas-continuous-integration
15+
PREFIX=ghcr.io/laminas/laminas-ci-matrix
1816
MAJOR="${PREFIX}:$(echo ${TAG} | cut -d. -f1)"
1917
MINOR="${MAJOR}.$(echo ${TAG} | cut -d. -f2)"
2018
PATCH="${PREFIX}:${TAG}"
21-
echo "::set-output name=tags::${MAJOR}%0A${MINOR}%0A${PATCH}"
19+
echo "::set-output name=tags::[\"${MAJOR}\",\"${MINOR}\",\"${PATCH}\"]"
2220
23-
release-container:
24-
runs-on: ubuntu-latest
25-
needs: [tags]
26-
steps:
2721
- name: Checkout
2822
uses: actions/checkout@v2
23+
2924
- name: Setup QEMU
3025
uses: docker/setup-qemu-action@v1
26+
3127
- name: Setup Docker Buildx
3228
uses: docker/setup-buildx-action@v1
29+
3330
- name: Login to GitHub Container Registry
3431
uses: docker/login-action@v1
3532
with:
3633
registry: ghcr.io
3734
username: ${{ secrets.CONTAINER_USERNAME }}
3835
password: ${{ secrets.CONTAINER_PAT }}
36+
3937
- name: Build and push
4038
uses: docker/build-push-action@v2
4139
with:
4240
context: .
4341
file: ./Dockerfile
4442
platforms: linux/amd64
4543
push: true
46-
tags: ${{ needs.tags.outputs.tags }}
47-
44+
tags: ${{ join(fromJSON(steps.tags.outputs.tags), "\n") }}

0 commit comments

Comments
 (0)