-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (61 loc) · 1.99 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Deploy Release
on:
release:
types: [ created ]
jobs:
release-tar:
name: Build release Tar
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
name: Set up JDK 11
with:
distribution: "temurin"
java-version: 11
cache: gradle
- name: Build release tar
run: ./gradlew distTar
- name: Tar Checksum
run: shasum -a 256 build/distributions/google-play-cli.tar
- name: Get release information
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload artifacts to release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./build/distributions/google-play-cli.tar
asset_name: google-play-cli.tar
asset_content_type: application/x-tar
docker-build-push:
name: Build and Push Docker image
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
needs: [ release-tar ]
steps:
- uses: actions/checkout@v4
- name: Get release information
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Docker Login
run: echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
env:
PACKAGES_WRITE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.actor }}
- name: Docker Build
run: docker build -t ghcr.io/vacxe/google-play-cli:$VERSION --build-arg="PLAY_CLI_VERSION=$VERSION" .
env:
VERSION: ${{ steps.get_release.outputs.tag_name }}
- name: Deploy
run: docker push ghcr.io/vacxe/google-play-cli:$VERSION
env:
VERSION: ${{ steps.get_release.outputs.tag_name }}