|
1 | 1 | name: "Release"
|
2 | 2 | on:
|
3 |
| - push: |
4 |
| - tags: |
5 |
| - - "v*" |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + version: |
| 6 | + description: "Example: 1.1.0" |
| 7 | + required: true |
| 8 | + type: string |
6 | 9 | jobs:
|
7 |
| - build: |
8 |
| - name: Create Release |
9 |
| - runs-on: ubuntu-latest |
| 10 | + image: |
| 11 | + name: Image |
| 12 | + runs-on: ubuntu-20.04 |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v3 |
| 15 | + - uses: docker/login-action@v2 |
| 16 | + with: |
| 17 | + registry: ghcr.io |
| 18 | + username: ${{ github.repository_owner }} |
| 19 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 20 | + - uses: devcontainers/[email protected] |
| 21 | + with: |
| 22 | + push: always |
| 23 | + imageName: ghcr.io/customink/crypteia-ci |
| 24 | + cacheFrom: ghcr.io/customink/crypteia-ci |
| 25 | + runCmd: echo DONE! |
| 26 | + debian: |
| 27 | + name: Debian x86_64/arm64 |
| 28 | + runs-on: ubuntu-20.04 |
| 29 | + needs: image |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v3 |
| 32 | + - uses: docker/login-action@v2 |
| 33 | + with: |
| 34 | + registry: ghcr.io |
| 35 | + username: cink-continuous-integration |
| 36 | + password: ${{ secrets.PUBLIC_GITHUB_TOKEN_PACKAGES }} |
| 37 | + - uses: devcontainers/[email protected] |
| 38 | + env: |
| 39 | + CRYPTEIA_VERSION: ${{ github.event.inputs.version }} |
| 40 | + with: |
| 41 | + push: never |
| 42 | + cacheFrom: ghcr.io/customink/crypteia-ci |
| 43 | + env: | |
| 44 | + CRYPTEIA_VERSION |
| 45 | + runCmd: ./package/deploy-image-debian |
| 46 | + amzn: |
| 47 | + name: AmazonLinux2 x86_64/arm64 |
| 48 | + runs-on: ubuntu-20.04 |
| 49 | + needs: image |
10 | 50 | steps:
|
11 |
| - - name: Get version from tag |
12 |
| - id: tag_name |
13 |
| - run: | |
14 |
| - echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} |
15 |
| - shell: bash |
16 |
| - - name: Checkout |
17 |
| - uses: actions/checkout@v2 |
18 |
| - - name: Login to GitHub Container Registry |
19 |
| - uses: docker/login-action@v2 |
| 51 | + - uses: actions/checkout@v3 |
| 52 | + - uses: docker/login-action@v2 |
20 | 53 | with:
|
21 | 54 | registry: ghcr.io
|
22 | 55 | username: cink-continuous-integration
|
23 | 56 | password: ${{ secrets.PUBLIC_GITHUB_TOKEN_PACKAGES }}
|
24 |
| - - name: Build & Run Development Container |
25 |
| - uses: devcontainers/[email protected] |
| 57 | + - uses: devcontainers/[email protected] |
| 58 | + env: |
| 59 | + CRYPTEIA_VERSION: ${{ github.event.inputs.version }} |
26 | 60 | with:
|
27 | 61 | push: never
|
28 |
| - cacheFrom: ghcr.io/customink/crypteia-devcontainer |
29 |
| - runCmd: | |
30 |
| - ./bin/setup |
31 |
| - ./amzn/setup |
32 |
| - - name: Get CHANGELOG Entry |
| 62 | + cacheFrom: ghcr.io/customink/crypteia-ci |
| 63 | + env: | |
| 64 | + CRYPTEIA_VERSION |
| 65 | + runCmd: ./package/deploy-image-amzn |
| 66 | + release: |
| 67 | + name: Create Release |
| 68 | + runs-on: ubuntu-20.04 |
| 69 | + needs: [debian, amzn] |
| 70 | + steps: |
| 71 | + - name: CHANGELOG Entry |
33 | 72 | id: changelog_reader
|
34 | 73 |
|
35 | 74 | with:
|
36 | 75 | validation_level: warn
|
37 |
| - version: ${{ steps.tag_name.outputs.current_version }} |
| 76 | + version: ${{ github.event.inputs.version }} |
38 | 77 | path: ./CHANGELOG.md
|
39 | 78 | - name: Create Release
|
40 | 79 | uses: ncipollo/release-action@v1
|
41 | 80 | with:
|
42 | 81 | allowUpdates: true
|
43 |
| - artifact: "./build/*.zip" |
| 82 | + artifacts: false |
44 | 83 | tag: ${{ steps.changelog_reader.outputs.version }}
|
45 | 84 | name: Release ${{ steps.changelog_reader.outputs.version }}
|
46 | 85 | body: ${{ steps.changelog_reader.outputs.changes }}
|
47 | 86 | prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
|
48 | 87 | draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
|
49 | 88 | token: ${{ secrets.GITHUB_TOKEN }}
|
50 |
| - - name: Push Container Package(s) |
51 |
| - run: | |
52 |
| - CRYPTEIA_VERSION=${{ steps.changelog_reader.outputs.version }} ./package/deploy-images |
53 |
| - CRYPTEIA_VERSION=latest ./package/deploy-images |
|
0 commit comments