feat: add release workflow and update README (#1)

This commit is contained in:
2023-10-15 22:24:46 +02:00
committed by GitHub
parent 4ef40e51be
commit 5a33fc61e8
2 changed files with 44 additions and 3 deletions

31
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Build and Push new release to ECR
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
role-session-name: github-actions-${{ github.repository_id }}-${{ github.ref_name }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: ${{ secrets.ECR_REPO }}
IMAGE_TAG: ${{ github.ref_name }}
run: |
docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG

View File

@ -1,7 +1,17 @@
# Build
# Customised Nextcloud Image
## Build
```bash
docker build -t $yourTag --build-arg NEXTCLOUD_TAG=$nextcloudTag .
# For example:
docker build -t thumbscrew/nextcloud:25.0.5 -t thumbscrew/nextcloud:latest --build-arg NEXTCLOUD_TAG=25.0.5-apache .
```
docker build -t thumbscrew/nextcloud:27.1.1 -t thumbscrew/nextcloud:latest --build-arg NEXTCLOUD_TAG=27.1.1-apache .
```
## (Alternative) Pull from Public ECR
Check the Github releases to see what tags are available
```bash
docker pull public.ecr.aws/m5x6c8x3/nextcloud:27.1.1
```