feat: add release workflow and update README (#1)
This commit is contained in:
31
.github/workflows/release.yaml
vendored
Normal file
31
.github/workflows/release.yaml
vendored
Normal 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
|
16
README.md
16
README.md
@ -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
|
||||
```
|
||||
|
Reference in New Issue
Block a user