-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (54 loc) · 2 KB
/
build-push.yml
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
name: Docker
on:
push:
branches:
- master
pull_request:
repository_dispatch:
types:
- build
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Git checkout main repo
uses: actions/checkout@v4
- name: Git checkout competitive maps
uses: actions/checkout@v4
with:
repository: OvercastCommunity/competitive-maps
token: ${{ secrets.GHR_PASSWORD }}
path: competitive-maps
- name: Set up Maven
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v9
with:
repositories: '[{ "id": "bolt-rip-private", "url": "https://repo.repsy.io/mvn/boltrip/private", "releases": { "enabled": "true" }, "snapshots": { "enabled": "true" } }]'
servers: '[{ "id": "bolt-rip-private", "username": "${{ secrets.MAVEN_USERNAME }}", "password": "${{ secrets.MAVEN_PASSWORD }}" }]'
- name: Delete useless files and directories
run: |
rm -rf competitive-maps/.git .git .github .gitignore competitive-maps/.github competitive-maps/.gitignore competitive-maps/README.md competitive-maps/_imaging_edits
- name: Push image
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
with:
source-directory: "."
destination-github-username: "bolt-rip"
destination-repository-name: "config-pgm-image"
user-email: [email protected]
target-branch: master
commit-message: ORIGIN_COMMIT
- name: Publish to Registry
uses: docker://lgohr/publish-docker-github-action:20210118133633a73f0f
with:
name: bolt-rip/config-pgm
registry: ghcr.io
username: ${{ secrets.GHR_USERNAME }}
password: ${{ secrets.GHR_PASSWORD }}
snapshot: true