-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.57 KB
/
Copy pathdocker.yaml
File metadata and controls
66 lines (56 loc) · 1.57 KB
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
name: Docker
on: [workflow_dispatch]
jobs:
docker-job:
runs-on: ubuntu-latest
container:
image: node:21.7-alpine3.18
# credentials:
# username:
# password:
env:
API_URL: some-url.com
ports:
- 80
# volumes:
# - vol_name:/path/in/container
# - /path/to/container
# - /path/in/host:/path/in/container
# options: --cpus 1
steps:
- name: Log Node & OS Versions
run: |
node -v
cat /etc/os-release
- name: Log Env
run: echo $API_URL
- name: Create a file
run: echo 'Some text' > text.txt
- name: Container in a Step
uses: docker://node:18.20-alpine3.18
with:
entrypoint: /usr/local/bin/node
args: -p 2+3
- name: Log node version
uses: docker://node:18.20-alpine3.18
with:
args: -v
- name: Show file contents
uses: docker://node:18.20-alpine3.18
with:
entrypoint: cat
args: text.txt
- uses: actions/checkout@v4
# git add --chmod=+x script.sh
- name: Run a bash script
uses: docker://node:18.20-alpine3.18
with:
entrypoint: ./script.sh
args: "Some string"
- name: Send a slack message
uses: docker://technosophos/slack-notify
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: From Github Actions
SLACK_MESSAGE: "Actor: ${{github.actor}}, Event: ${{github.event_name}}"
SLACK_COLOR: "#723fc4"