Merge pull request 'actionTest' (#4) from actionTest into main

Reviewed-on: https://forgejo.merr.is/annika/isl-api/pulls/4
This commit is contained in:
annika 2024-02-04 15:19:08 -05:00
commit 62bbf85041
3 changed files with 37 additions and 43 deletions

View file

@ -1,38 +0,0 @@
---
name: release
on:
push:
env:
DOCKER_HOST: tcp://docker-in-docker:2375
jobs:
build:
name: Build and push docker image
runs-on: docker
container:
image: node:21-alpine
steps:
- name: Install docker
shell: /bin/ash -e {0}
run: apk add --update docker git
- name: Check out the repo
uses: https://github.com/actions/checkout@v4
- name: Get Metadata For Docker
id: meta
uses: https://github.com/docker/metadata-action@v5
with:
images: forgejo.merr.is/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.licenses=MIT
- name: Debugging steps.meta.outputs.tags
shell: /bin/ash -e {0}
run: echo "${{ steps.meta.outputs.tags }}"
- name: Debugging steps.meta.outputs.labels
shell: /bin/ash -e {0}
run: echo "${{ steps.meta.outputs.labels }}"

View file

@ -0,0 +1,32 @@
---
name: release
on:
push:
env:
DOCKER_HOST: tcp://docker-in-docker:2375
jobs:
build:
name: Build and push docker image
runs-on: docker
container:
image: node:21-alpine
steps:
- name: Install docker
shell: /bin/ash -e {0}
run: apk add --update docker git
- name: Create Some Files
shell: /bin/ash -e {0}
run: |
mkdir -p /dist
touch /dist/test1
touch /dist/test2
- name: Check out the repo
uses: https://github.com/actions/checkout@v4
- name: See If I Can Call My forgejo-release
uses: https://forge.merr.is/actions/forgejo-release@alpinev1
with:
direction: upload
release-dir: /dist

View file

@ -22,7 +22,7 @@ jobs:
steps:
- name: Install docker
shell: /bin/ash -e {0}
run: apk add --update docker git
run: apk add --update docker git bash
- name: Check out the repo
uses: https://github.com/actions/checkout@v4
- name: Get Metadata For Docker
@ -64,12 +64,12 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
shell_command: /bin/ash -c
image: ${{ fromJSON(steps.meta.outputs.tags)[0] }}
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
path: isl-api
destination: dist
- name: Create Release
uses: https://github.com/softprops/action-gh-release@v1
uses: https://code.forgejo.org/actions/forgejo-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/isl-api
direction: upload