Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos, more updates to actions and fix for untagged build-deb-action #407

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/build/docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ runs:

########################### Log into Dockerhub ###########################
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3.0.0
with:
username: ${{ inputs.docker_hub_username }}
password: ${{ inputs.docker_hub_access_token }}

########################### Setup Docker ###########################
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3.0.0

########################### Build and Push Docker images ###########################
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5.1.0
id: docker_build
with:
context: .
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build/dpkg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ runs:
package: osctrl-${{ inputs.osctrl_component }}
package_root: ".debpkg-osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}"
maintainer: jmpsec/osctrl
version: ${{ inputs.commit_sha }}
version: "0.0-${{ inputs.commit_sha }}"
arch: ${{ inputs.go_arch }}
desc: "DEB package for osctrl-${OSCTRL_COMPONENT}-${OSCTRL_VERSION} Commit SHA: ${COMMIT_SHA}"

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/tagged_release/docker/codesign/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ runs:

########################### Log into Dockerhub ###########################
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3.0.0
with:
username: ${{ inputs.docker_hub_username }}
password: ${{ inputs.docker_hub_access_token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/tagged_release/github/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ runs:

########################### Release ###########################
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v0.1.15
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test/binaries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ runs:

########################### Lint golang code ###########################
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4.0.0
with:
version: v1.29

Expand Down
4 changes: 2 additions & 2 deletions deploy/cicd/deb/deb-conffiles
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}/service.json
/etc/systemd/system/osctrl-{{ OSCTRL_COMPONTENT }}.service
/etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}/service.json
/etc/systemd/system/osctrl-{{ OSCTRL_COMPONENT }}.service
12 changes: 5 additions & 7 deletions deploy/cicd/deb/post-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
set -e

################### Set perms on config directory ###################
if [ -d "/etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}" ]
if [ -d "/etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}" ]
then
chown root:osctrl -R /etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}
chown root:osctrl -R /etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}
fi

################### Copy common configs ###################
if [ ! -f /usr/share/osctrl/db.json.example ]
then
cp /tmp/osctrl-{{ OSCTRL_COMPONTENT }}/db.json.example /usr/share/osctrl/db.json.example
cp /tmp/osctrl-{{ OSCTRL_COMPONENT }}/db.json.example /usr/share/osctrl/db.json.example
chown root:root /usr/share/osctrl/db.json.example
fi

if [ ! -f /usr/share/osctrl/redis.json.example ]
then
cp /tmp/osctrl-{{ OSCTRL_COMPONTENT }}/redis.json.example /usr/share/osctrl/redis.json.example
cp /tmp/osctrl-{{ OSCTRL_COMPONENT }}/redis.json.example /usr/share/osctrl/redis.json.example
chown root:root /usr/share/osctrl/redis.json.example
fi
rm -rd /tmp/osctrl-{{ OSCTRL_COMPONTENT }}
rm -rd /tmp/osctrl-{{ OSCTRL_COMPONENT }}

################### osctrl-admin web assets ###################
if [ -d "/usr/share/osctrl/tmpl_admin" ]
Expand All @@ -36,8 +36,6 @@ then

# new files and folders inherit group ownership from the parent folder
chmod g+s /usr/share/osctrl/tmpl_admin/


fi

if [ -d "/usr/share/osctrl/static" ]
Expand Down
8 changes: 4 additions & 4 deletions deploy/cicd/deb/pre-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ then
chown root:root -R /etc/osctrl
fi

if [ ! -d "/etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}" ]
if [ ! -d "/etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}" ]
then
echo "Directory /etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }} DOES NOT exists."
mkdir /etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}
chown root:osctrl /etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}
echo "Directory /etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }} DOES NOT exists."
mkdir /etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}
chown root:osctrl /etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}
fi

################### Create osctrl log directory ###################
Expand Down
Loading